org.apache.commons.compress.compressors.gzip
public class GzipCompressorInputStream extends CompressorInputStream
Modifier and Type | Field and Description |
---|---|
private java.util.zip.GZIPInputStream |
in |
Constructor and Description |
---|
GzipCompressorInputStream(java.io.InputStream inputStream)
Constructs a new GZip compressed input stream by the referenced
InputStream.
|
Modifier and Type | Method and Description |
---|---|
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) |
count, count, getBytesRead, getCount
public GzipCompressorInputStream(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the InputStream from which this object should be created ofjava.io.IOException
- if the stream could not be createdpublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int from, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public static boolean matches(byte[] signature, int length)
signature
- the bytes to checklength
- the number of bytes to check