|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.apache.commons.compress.compressors.CompressorInputStream
org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream
public class GzipCompressorInputStream
Implements the "gz" compression format as an input stream. This classes wraps the standard java classes for working with gz.
Constructor Summary | |
---|---|
GzipCompressorInputStream(InputStream inputStream)
Constructs a new GZip compressed input stream by the referenced InputStream. |
Method Summary | |
---|---|
void |
close()
Closes the input stream (unless it is System.in). |
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a gzip file. |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int from,
int length)
|
Methods inherited from class org.apache.commons.compress.compressors.CompressorInputStream |
---|
count, count, getBytesRead, getCount |
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 GzipCompressorInputStream(InputStream inputStream) throws IOException
inputStream
- the InputStream from which this object should be created of
IOException
- if the stream could not be createdMethod Detail |
---|
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int from, int length) throws IOException
read
in class InputStream
IOException
public static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to check
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |