|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java13.io.FilterInputStream
net.sf.jazzlib.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 java13.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
InflaterInputStream(java.io.InputStream in)
Create an InflaterInputStream with the default decompresseor and a default buffer size. |
|
InflaterInputStream(java.io.InputStream in,
Inflater inf)
Create an InflaterInputStream with the specified decompresseor and a default buffer size. |
|
InflaterInputStream(java.io.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. |
int |
read()
Reads one byte of decompressed data. |
int |
read(byte[] b,
int off,
int len)
Decompresses data into the byte array |
long |
skip(long n)
Skip specified number of bytes of uncompressed data |
Methods inherited from class java13.io.FilterInputStream |
---|
mark, markSupported, read, reset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Inflater inf
protected byte[] buf
protected int len
Constructor Detail |
---|
public InflaterInputStream(java.io.InputStream in)
in
- the InputStream to read bytes frompublic InflaterInputStream(java.io.InputStream in, Inflater inf)
in
- the InputStream to read bytes frominf
- the decompressor used to decompress data read from inpublic InflaterInputStream(java.io.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 useMethod Detail |
---|
public int available() throws java.io.IOException
available
in class FilterInputStream
java.io.IOException
- if an I/O error occurs.java.io.FilterInputStream#in
public void close() throws java.io.IOException
close
in class FilterInputStream
java.io.IOException
- if an I/O error occurs.java.io.FilterInputStream#in
protected void fill() throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
read
in class FilterInputStream
-1
if the end of the
stream is reached.
java.io.IOException
- if an I/O error occurs.java.io.FilterInputStream#in
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class FilterInputStream
b
- the array to read and decompress data intooff
- the offset indicating where the data should be placedlen
- the number of bytes to decompress
-1
if there is no more data because the end of
the stream has been reached.
java.io.IOException
- if an I/O error occurs.java.io.FilterInputStream#in
public long skip(long n) throws java.io.IOException
skip
in class FilterInputStream
n
- number of bytes to skip
java.io.IOException
- if an I/O error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |