Class HadoopSnappyCompressionInputStream
java.lang.Object
java.io.InputStream
org.pentaho.di.core.compress.CompressionInputStream
org.pentaho.di.core.compress.hadoopsnappy.HadoopSnappyCompressionInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields inherited from class org.pentaho.di.core.compress.CompressionInputStream
delegate
-
Constructor Summary
ConstructorDescriptionHadoopSnappyCompressionInputStream
(InputStream in, CompressionProvider provider) -
Method Summary
Modifier and TypeMethodDescriptionprotected static InputStream
static InputStream
getSnappyInputStream
(int bufferSize, InputStream in) Gets an InputStream that uses the snappy codec and wraps the supplied base input stream.static InputStream
Gets a CompressionInputStream that uses the snappy codec and wraps the supplied base input stream.Methods inherited from class org.pentaho.di.core.compress.CompressionInputStream
close, getCompressionProvider, read, read, read
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
HadoopSnappyCompressionInputStream
public HadoopSnappyCompressionInputStream(InputStream in, CompressionProvider provider) throws IOException - Throws:
IOException
-
-
Method Details
-
getDelegate
- Throws:
IOException
-
nextEntry
- Overrides:
nextEntry
in classCompressionInputStream
- Throws:
IOException
-
getSnappyInputStream
Gets a CompressionInputStream that uses the snappy codec and wraps the supplied base input stream.- Parameters:
in
- the base input stream to wrap around- Returns:
- an InputStream that uses the Snappy codec
- Throws:
Exception
- if snappy is not available or an error occurs during reflection
-
getSnappyInputStream
Gets an InputStream that uses the snappy codec and wraps the supplied base input stream.- Parameters:
the
- buffer size for the codec to use (in bytes)in
- the base input stream to wrap around- Returns:
- an InputStream that uses the Snappy codec
- Throws:
Exception
- if snappy is not available or an error occurs during reflection
-