Search in sources :

Example 11 with CompressionProvider

use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.

the class SnappyCompressionOutputStreamTest method testAddEntry.

@Test
public void testAddEntry() throws IOException {
    CompressionProvider provider = outStream.getCompressionProvider();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    outStream = new SnappyCompressionOutputStream(out, provider);
    outStream.addEntry(null, null);
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Test(org.junit.Test)

Example 12 with CompressionProvider

use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.

the class ZIPCompressionInputStreamTest method testRead.

@Test
public void testRead() throws IOException {
    CompressionProvider provider = inStream.getCompressionProvider();
    ByteArrayInputStream in = new ByteArrayInputStream("Test".getBytes());
    inStream = new ZIPCompressionInputStream(in, provider) {
    };
    inStream.read(new byte[100], 0, inStream.available());
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) ByteArrayInputStream(java.io.ByteArrayInputStream) Test(org.junit.Test)

Example 13 with CompressionProvider

use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.

the class ZIPCompressionInputStreamTest method setUp.

@Before
public void setUp() throws Exception {
    factory = CompressionProviderFactory.getInstance();
    CompressionProvider provider = factory.getCompressionProviderByName(PROVIDER_NAME);
    ByteArrayInputStream in = new ByteArrayInputStream("Test".getBytes());
    inStream = new ZIPCompressionInputStream(in, provider) {
    };
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) ByteArrayInputStream(java.io.ByteArrayInputStream) Before(org.junit.Before)

Example 14 with CompressionProvider

use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.

the class ZIPCompressionOutputStreamTest method setUp.

@Before
public void setUp() throws Exception {
    factory = CompressionProviderFactory.getInstance();
    CompressionProvider provider = factory.getCompressionProviderByName(PROVIDER_NAME);
    internalStream = new ByteArrayOutputStream();
    outStream = new ZIPCompressionOutputStream(internalStream, provider);
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Before(org.junit.Before)

Example 15 with CompressionProvider

use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.

the class ZIPCompressionOutputStreamTest method testClose.

@Test
public void testClose() throws IOException {
    CompressionProvider provider = outStream.getCompressionProvider();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    outStream = new ZIPCompressionOutputStream(out, provider);
    outStream.close();
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) ByteArrayOutputStream(java.io.ByteArrayOutputStream) Test(org.junit.Test)

Aggregations

CompressionProvider (org.pentaho.di.core.compress.CompressionProvider)27 Test (org.junit.Test)14 ByteArrayOutputStream (java.io.ByteArrayOutputStream)11 KettleException (org.pentaho.di.core.exception.KettleException)7 ValueMetaString (org.pentaho.di.core.row.value.ValueMetaString)7 IOException (java.io.IOException)6 FileInputList (org.pentaho.di.core.fileinput.FileInputList)6 InputStreamReader (java.io.InputStreamReader)5 InputStream (java.io.InputStream)4 ArrayList (java.util.ArrayList)4 FileObject (org.apache.commons.vfs2.FileObject)4 Before (org.junit.Before)4 CompressionInputStream (org.pentaho.di.core.compress.CompressionInputStream)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 List (java.util.List)2 CTabFolder (org.eclipse.swt.custom.CTabFolder)2 FocusListener (org.eclipse.swt.events.FocusListener)2 ModifyEvent (org.eclipse.swt.events.ModifyEvent)2 ModifyListener (org.eclipse.swt.events.ModifyListener)2 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)2