Search in sources :

Example 26 with CompressionProvider

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

the class ZIPCompressionOutputStreamTest method getCompressionProvider.

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

Example 27 with CompressionProvider

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

the class ZIPCompressionOutputStreamTest method testAddEntryAndWrite.

@Test
public void testAddEntryAndWrite() throws IOException {
    CompressionProvider provider = outStream.getCompressionProvider();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    outStream = new ZIPCompressionOutputStream(out, provider);
    outStream.addEntry("./test.zip", null);
    outStream.write("Test".getBytes());
}
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