Class DeflateCompressorOutputStream

All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class DeflateCompressorOutputStream extends CompressorOutputStream<DeflaterOutputStream>
Deflate compressor. Calling flush()

Calling flush() flushes the encoder and calls outputStream.flush(). All buffered pending data will then be decompressible from the output stream. Calling this function very often may increase the compressed file size a lot.

Since:
1.9
  • Field Details

    • deflater

      private final Deflater deflater
  • Constructor Details

    • DeflateCompressorOutputStream

      public DeflateCompressorOutputStream(OutputStream outputStream)
      Creates a Deflate compressed output stream with the default parameters.
      Parameters:
      outputStream - the stream to wrap
    • DeflateCompressorOutputStream

      public DeflateCompressorOutputStream(OutputStream outputStream, DeflateParameters parameters)
      Creates a Deflate compressed output stream with the specified parameters.
      Parameters:
      outputStream - the stream to wrap
      parameters - the deflate parameters to apply
  • Method Details