Class DeflaterInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.util.zip.DeflaterInputStream
All Implemented Interfaces:
Closeable,AutoCloseable

public classDeflaterInputStreamextendsFilterInputStream
Implements an input stream filter for compressing data in the "deflate" compression format.
Since:
1.6
See Also:
  • Field Details

    • def

      protected final Deflater def
      Compressor for this stream.
    • buf

      protected final byte[] buf
      Input buffer for reading compressed data.
  • Constructor Details

    • DeflaterInputStream

      public DeflaterInputStream(InputStream in)
      Creates a new input stream with a default compressor and buffer size.
      Parameters:
      in - input stream to read the uncompressed data to
      Throws:
      NullPointerException - ifin is null
    • DeflaterInputStream

      public DeflaterInputStream(InputStream in,Deflater defl)
      Creates a new input stream with the specified compressor and a default buffer size.
      Parameters:
      in - input stream to read the uncompressed data to
      defl - compressor ("deflater") for this stream
      Throws:
      NullPointerException - ifin ordefl is null
    • DeflaterInputStream

      public DeflaterInputStream(InputStream in,Deflater defl, int bufLen)
      Creates a new input stream with the specified compressor and buffer size.
      Parameters:
      in - input stream to read the uncompressed data to
      defl - compressor ("deflater") for this stream
      bufLen - compression buffer size
      Throws:
      IllegalArgumentException - ifbufLen <= 0
      NullPointerException - ifin ordefl is null
  • Method Details