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
public class HadoopSnappyCompressionInputStream extends CompressionInputStream
-
-
Field Summary
-
Fields inherited from class org.pentaho.di.core.compress.CompressionInputStream
delegate
-
-
Constructor Summary
Constructors Constructor Description HadoopSnappyCompressionInputStream(InputStream in, CompressionProvider provider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static InputStream
getDelegate(InputStream in)
static InputStream
getSnappyInputStream(int bufferSize, InputStream in)
Gets an InputStream that uses the snappy codec and wraps the supplied base input stream.static InputStream
getSnappyInputStream(InputStream in)
Gets a CompressionInputStream that uses the snappy codec and wraps the supplied base input stream.Object
nextEntry()
-
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, transferTo
-
-
-
-
Constructor Detail
-
HadoopSnappyCompressionInputStream
public HadoopSnappyCompressionInputStream(InputStream in, CompressionProvider provider) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getDelegate
protected static InputStream getDelegate(InputStream in) throws IOException
- Throws:
IOException
-
nextEntry
public Object nextEntry() throws IOException
- Overrides:
nextEntry
in classCompressionInputStream
- Throws:
IOException
-
getSnappyInputStream
public static InputStream getSnappyInputStream(InputStream in) throws Exception
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
public static InputStream getSnappyInputStream(int bufferSize, InputStream in) throws Exception
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
-
-