|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.bolet.jgz.GZipInputStream
public class GZipInputStream
This class decompresses a data stream compressed in the
gzip
format, as documented in RFC 1952. It is somewhat
similar to the standard java.util.zip.GZIPInputStream
class.
This stream is blocking: when asked to read a
given amount of uncompressed bytes, it will return that number of
bytes, possibly invoking many times the underlying stream. A short
count is possible only if the end of the underlying stream was
reached. Note that end-of-stream may occur only between
gzip
"members"; unexpected end-of-stream is a format
error which is reported as such.
gzip
streams may contain some meta-information such
as a file name or producer OS; these are not returned by this class.
To access meta-information, use the more generic
GZipDecoder
class.
It is highly recommended that the provided source input stream is buffered. The inflater engine will read it byte by byte most of the time.
Constructor Summary | |
---|---|
GZipInputStream(java.io.InputStream sub)
Create the stream over the provided underlying stream. |
Method Summary | |
---|---|
void |
close()
The implementation for this method closes the underlying input stream. |
int |
read()
|
int |
read(byte[] buf)
|
int |
read(byte[] buf,
int off,
int len)
|
Methods inherited from class java.io.InputStream |
---|
available, mark, markSupported, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GZipInputStream(java.io.InputStream sub)
sub
- the underlying streamMethod Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
InputStream
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
InputStream
public int read(byte[] buf) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
InputStream
public int read(byte[] buf, int off, int len) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
InputStream
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |