|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.util.zip.InflaterInputStream
public class 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.
| Field Summary | |
|---|---|
protected byte[] |
buf
Byte array used as a buffer |
protected Inflater |
inf
Decompressor for this filter |
protected int |
len
Size of buffer |
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
InflaterInputStream(InputStream in)
Create an InflaterInputStream with the default decompresseor and a default buffer size. |
|
InflaterInputStream(InputStream in,
Inflater inf)
Create an InflaterInputStream with the specified decompresseor and a default buffer size. |
|
InflaterInputStream(InputStream in,
Inflater inf,
int size)
Create an InflaterInputStream with the specified decompresseor and a specified buffer size. |
|
| Method Summary | |
|---|---|
int |
available()
Returns 0 once the end of the stream (EOF) has been reached. |
void |
close()
Closes the input stream |
protected void |
fill()
Fills the buffer with more data to decompress. |
void |
mark(int readLimit)
Calls the in.mark(int) method. |
boolean |
markSupported()
Calls the in.markSupported() method. |
int |
read()
Reads one byte of decompressed data. |
int |
read(byte[] b,
int off,
int len)
Decompresses data into the byte array |
void |
reset()
Calls the in.reset() method. |
long |
skip(long n)
Skip specified number of bytes of uncompressed data |
| Methods inherited from class java.io.FilterInputStream |
|---|
read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Inflater inf
protected byte[] buf
protected int len
| Constructor Detail |
|---|
public InflaterInputStream(InputStream in)
in - the InputStream to read bytes from
public InflaterInputStream(InputStream in,
Inflater inf)
in - the InputStream to read bytes frominf - the decompressor used to decompress data read from in
public InflaterInputStream(InputStream in,
Inflater inf,
int size)
in - the InputStream to read bytes frominf - the decompressor used to decompress data read from insize - size of the buffer to use| Method Detail |
|---|
public int available()
throws IOException
available in class FilterInputStreamin.available()
IOException - If an error occurs
public void close()
throws IOException
close in interface Closeableclose in class FilterInputStreamIOException - If an error occurs
protected void fill()
throws IOException
IOException
public int read()
throws IOException
read in class FilterInputStreamin.read()
IOException - If an error occurs
public int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamb - the array to read and decompress data intooff - the offset indicating where the data should be placedlen - the number of bytes to decompress
in.read(byte[], int, int)
IOException - If an error occurs
public long skip(long n)
throws IOException
skip in class FilterInputStreamn - number of bytes to skip
in.skip(long)
IOException - If an error occurspublic boolean markSupported()
FilterInputStreamin.markSupported() method.
markSupported in class FilterInputStreamtrue if mark/reset is supported, false
otherwisepublic void mark(int readLimit)
FilterInputStreamin.mark(int) method.
mark in class FilterInputStreamreadLimit - The parameter passed to in.mark(int)
public void reset()
throws IOException
FilterInputStreamin.reset() method.
reset in class FilterInputStreamIOException - If an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||