java.util.zip
Class InflaterInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--java.util.zip.InflaterInputStream
This filter stream is used to decompress data compressed in the "deflate"
format. The "deflate" format is described in RFC 1951.
This stream may form the basis for other decompression filters, such
as the GZIPInputStream
.
Since:Author:buf
protected byte[] buf
Byte array used as a buffer
inf
protected Inflater inf
Decompressor for this filter
len
protected int len
Size of buffer
InflaterInputStream
public InflaterInputStream(java.io.InputStream in)
Create an InflaterInputStream with the default decompresseor
and a default buffer size.
Parameters:
InflaterInputStream
public InflaterInputStream(java.io.InputStream in, java.util.zip.Inflater inf)
Create an InflaterInputStream with the specified decompresseor
and a default buffer size.
Parameters:
InflaterInputStream
public InflaterInputStream(java.io.InputStream in, java.util.zip.Inflater inf, int size)
Create an InflaterInputStream with the specified decompresseor
and a specified buffer size.
Parameters:
available
public int available()
Returns 0 once the end of the stream (EOF) has been reached.
Otherwise returns 1.
close
public void close()
Closes the input stream
fill
protected void fill()
Fills the buffer with more data to decompress.
mark
public void mark(int readlimit)
Throws an exception.
Parameters:
See Also:
markSupported
public boolean markSupported()
Since this stream tends to buffer large (unpredictable?) amounts
of stuff, it causes problems to the mark/reset mechanism. Hence,
it claims not to support mark.
Returns:
read
public int read()
Reads one byte of decompressed data.
The byte is in the lower 8 bits of the int.
read
public int read(byte[] b, int off, int len)
Decompresses data into the byte array
Parameters:
reset
public void reset()
Throws an exception.
Throws:
See Also:
skip
public long skip(long n)
Skip specified number of bytes of uncompressed data
Parameters:
GZIPInputStream
.