Class HadoopSnappyCompressionOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.pentaho.di.core.compress.CompressionOutputStream
-
- org.pentaho.di.core.compress.hadoopsnappy.HadoopSnappyCompressionOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class HadoopSnappyCompressionOutputStream extends CompressionOutputStream
-
-
Field Summary
-
Fields inherited from class org.pentaho.di.core.compress.CompressionOutputStream
delegate
-
-
Constructor Summary
Constructors Constructor Description HadoopSnappyCompressionOutputStream(OutputStream out, CompressionProvider provider)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OutputStream
getSnappyOutputStream(int bufferSize, OutputStream out)
Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.static OutputStream
getSnappyOutputStream(OutputStream out)
Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.-
Methods inherited from class org.pentaho.di.core.compress.CompressionOutputStream
addEntry, close, getCompressionProvider, write, write, write
-
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
-
-
-
Constructor Detail
-
HadoopSnappyCompressionOutputStream
public HadoopSnappyCompressionOutputStream(OutputStream out, CompressionProvider provider) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getSnappyOutputStream
public static OutputStream getSnappyOutputStream(OutputStream out) throws Exception
Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.- Parameters:
the
- buffer size for the codec to use (in bytes)out
- the base output stream to wrap around- Returns:
- a OutputStream that uses the Snappy codec
- Throws:
Exception
- if snappy is not available or an error occurs during reflection
-
getSnappyOutputStream
public static OutputStream getSnappyOutputStream(int bufferSize, OutputStream out) throws Exception
Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.- Parameters:
the
- buffer size for the codec to use (in bytes)out
- the base output stream to wrap around- Returns:
- a OutputStream that uses the Snappy codec
- Throws:
Exception
- if snappy is not available or an error occurs during reflection
-
-