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
  • Constructor Details

  • Method Details

    • getDelegate

      protected static InputStream getDelegate(InputStream in) throws IOException
      Throws:
      IOException
    • nextEntry

      public Object nextEntry() throws IOException
      Overrides:
      nextEntry in class CompressionInputStream
      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