java.util.zip
public
class
java.util.zip.InflaterInputStream
InflaterOutputStream read data which has been compressed using the DEFLATE
compression method.
Known Direct Subclasses
GZIPInputStream |
The GZIPInputStream class is used to read data stored in the GZIP format. |
ZipInputStream |
ZipInputStream is an input stream for reading zip files. |
Known Indirect Subclasses
Summary
Fields
Public Constructors
Public Methods
Protected Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Fields
Public Constructors
public
InflaterInputStream(InputStream is)
Constructs a new InflaterOutputStream on is
Parameters
is
| The InputStream to read data from
|
Constructs a new InflaterOutputStream on is, using the Inflater provided
in inf.
Parameters
is
| The InputStream to read data from |
inf
| The Inflater to use for decompression
|
public
InflaterInputStream(InputStream is, Inflater inf, int bsize)
Constructs a new InflaterOutputStream on is, using the Inflater provided
in inf. The size of the inflation buffer is determined by bsize.
Parameters
is
| The InputStream to read data from |
inf
| The Inflater to use for decompression |
bsize
| size of the inflation buffer
|
Public Methods
public
int
available()
Returns 0 if this stream has been closed, 1 otherwise.
Returns
- the number of bytes available before blocking.
public
void
mark(int readlimit)
Marks the current position in the stream.
This implementation overrides the supertype implementation to do nothing
at all.
public
boolean
markSupported()
Returns whether the receiver implements mark semantics. This type
does not support mark, so always responds
false
.
public
int
read(byte[] buffer, int off, int nbytes)
Reads up to nbytes of decompressed data and stores it in buf starting at
off.
Parameters
buffer
| Buffer to store into |
off
| offset in buffer to store at |
nbytes
| number of bytes to store |
Returns
- Number of uncompressed bytes read
public
int
read()
Reads a single byte of decompressed data.
public
void
reset()
Reset the position of the stream to the last mark position.
This implementation overrides the supertype implementation and always
throws an
IOException when called.
public
long
skip(long nbytes)
Skips up to nbytes of uncompressed data.
Parameters
nbytes
| Number of bytes to skip |
Returns
- Number of uncompressed bytes skipped
Protected Methods