Module java.base
Package java.util.zip

Class DeflaterInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class DeflaterInputStream
extends FilterInputStream
Implements an input stream filter for compressing data in the "deflate" compression format.
Since:
1.6
See Also:
DeflaterOutputStream, InflaterOutputStream, InflaterInputStream
  • 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 - if in 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 - if in or defl 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 - if bufLen <= 0
      NullPointerException - if in or defl is null
  • Method Details