This class is a subclass of; it reads a specified stream of compressed input data (typically one that was written with DeflaterOutputStream or a subclass) and filters that data by uncompressing (inflating) it. To create an InflaterInputStream, specify both the input stream to read from and an Inflater object to perform the decompression. Once an InflaterInputStream is created, the read( ) and skip( ) methods are the same as those of other input streams. The InflaterInputStream uncompresses raw data. Applications often prefer one of its subclasses, GZIPInputStream or ZipInputStream, that work with compressed data written in the standard gzip and PKZip file formats.

Figure 16-142.

public class InflaterInputStream extends {
// Public Constructors
     public InflaterInputStream( in);  
     public InflaterInputStream( in, Inflater inf);  
     public InflaterInputStream( in, Inflater inf, int size);  
// Public Methods Overriding FilterInputStream
                  1.2  public int available( ) throws;  
1.2  public void close( ) throws;  
5.0  public void mark(int readlimit);                         synchronized empty
5.0  public boolean markSupported( );                                 constant
     public int read( ) throws;  
     public int read(byte[ ] b, int ...

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.