Class HadoopSnappyCompressionInputStream

    • Method Detail

      • 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