use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.
the class GZIPCompressionOutputStreamTest method testWrite.
@Test
public void testWrite() throws IOException {
CompressionProvider provider = outStream.getCompressionProvider();
ByteArrayOutputStream out = new ByteArrayOutputStream();
outStream = new GZIPCompressionOutputStream(out, provider);
outStream.write("Test".getBytes());
}
use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.
the class GZIPCompressionOutputStreamTest method testClose.
@Test
public void testClose() throws IOException {
CompressionProvider provider = outStream.getCompressionProvider();
ByteArrayOutputStream out = new ByteArrayOutputStream();
outStream = new GZIPCompressionOutputStream(out, provider) {
};
outStream.close();
try {
outStream.write("This will throw an Exception if the stream is already closed".getBytes());
fail();
} catch (IOException e) {
// Success, The Output Stream was already closed
}
}
use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.
the class GZIPCompressionOutputStreamTest method getCompressionProvider.
@Test
public void getCompressionProvider() {
CompressionProvider provider = outStream.getCompressionProvider();
assertEquals(provider.getName(), PROVIDER_NAME);
}
use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.
the class SnappyCompressionOutputStreamTest method getCompressionProvider.
@Test
public void getCompressionProvider() {
CompressionProvider provider = outStream.getCompressionProvider();
assertEquals(provider.getName(), PROVIDER_NAME);
}
use of org.pentaho.di.core.compress.CompressionProvider in project pentaho-kettle by pentaho.
the class SnappyCompressionOutputStreamTest method testClose.
@Test
public void testClose() throws IOException {
CompressionProvider provider = outStream.getCompressionProvider();
ByteArrayOutputStream out = new ByteArrayOutputStream();
outStream = new SnappyCompressionOutputStream(out, provider);
outStream.close();
}
Aggregations