Search in sources :

Example 21 with CompressionProvider

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

the class GZIPCompressionInputStreamTest method getZIPCompressionProvider.

@Test
public void getZIPCompressionProvider() {
    CompressionProvider provider = inStream.getCompressionProvider();
    assertEquals(provider.getName(), PROVIDER_NAME);
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) Test(org.junit.Test)

Example 22 with CompressionProvider

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

the class GZIPCompressionOutputStreamTest method testAddEntry.

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

Example 23 with CompressionProvider

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

the class SnappyCompressionOutputStreamTest method setUp.

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

Example 24 with CompressionProvider

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

the class SnappyCompressionOutputStreamTest method testWrite.

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

Example 25 with CompressionProvider

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

the class ZIPCompressionInputStreamTest method getZIPCompressionProvider.

@Test
public void getZIPCompressionProvider() {
    CompressionProvider provider = inStream.getCompressionProvider();
    assertEquals(provider.getName(), PROVIDER_NAME);
}
Also used : CompressionProvider(org.pentaho.di.core.compress.CompressionProvider) 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