Class FramedSnappyCompressorOutputStream

    • Field Summary

      • Fields inherited from class java.io.FilterOutputStream

        out
    • Constructor Summary

      Constructors 
      Constructor Description
      FramedSnappyCompressorOutputStream​(java.io.OutputStream out)
      Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
      FramedSnappyCompressorOutputStream​(java.io.OutputStream out, Parameters params)
      Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
    • Constructor Detail

      • FramedSnappyCompressorOutputStream

        public FramedSnappyCompressorOutputStream​(java.io.OutputStream out)
                                           throws java.io.IOException
        Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
        Parameters:
        out - the OutputStream to which to write the compressed data
        Throws:
        java.io.IOException - if writing the signature fails
      • FramedSnappyCompressorOutputStream

        public FramedSnappyCompressorOutputStream​(java.io.OutputStream out,
                                                  Parameters params)
                                           throws java.io.IOException
        Constructs a new output stream that compresses snappy-framed-compressed data to the specified output stream.
        Parameters:
        out - the OutputStream to which to write the compressed data
        params - parameters used to fine-tune compression, in particular to balance compression ratio vs compression speed.
        Throws:
        java.io.IOException - if writing the signature fails
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class CompressFilterOutputStream<java.io.OutputStream>
        Throws:
        java.io.IOException
      • finish

        public void finish()
                    throws java.io.IOException
        Compresses all remaining data and writes it to the stream, doesn't close the underlying stream.
        Overrides:
        finish in class CompressFilterOutputStream<java.io.OutputStream>
        Throws:
        java.io.IOException - if an error occurs
      • write

        public void write​(byte[] data,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(int b)
                   throws java.io.IOException
        Overrides:
        write in class java.io.FilterOutputStream
        Throws:
        java.io.IOException