Class FramedLZ4CompressorOutputStream

    • Constructor Detail

      • FramedLZ4CompressorOutputStream

        public FramedLZ4CompressorOutputStream​(java.io.OutputStream out)
                                        throws java.io.IOException
        Constructs a new output stream that compresses data using the LZ4 frame format using the default block size of 4MB.
        Parameters:
        out - the OutputStream to which to write the compressed data
        Throws:
        java.io.IOException - if writing the signature fails
      • FramedLZ4CompressorOutputStream

        public FramedLZ4CompressorOutputStream​(java.io.OutputStream out,
                                               FramedLZ4CompressorOutputStream.Parameters params)
                                        throws java.io.IOException
        Constructs a new output stream that compresses data using the LZ4 frame format using the given block size.
        Parameters:
        out - the OutputStream to which to write the compressed data
        params - the parameters to use
        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 blockDataRemaining 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