public class OpenJDK7GZIPInputStream extends OpenJDK7InflaterInputStream
InflaterInputStream| Modifier and Type | Field and Description |
|---|---|
protected java.util.zip.CRC32 |
crc
CRC-32 for uncompressed data.
|
protected boolean |
eos
Indicates end of input stream.
|
protected static int |
FCOMMENT |
protected static int |
FEXTRA |
protected static int |
FHCRC |
protected static int |
FNAME |
protected static int |
FTEXT |
static int |
GZIP_MAGIC
GZIP header magic number.
|
buf, inf, len, usesDefaultInflater| Constructor and Description |
|---|
OpenJDK7GZIPInputStream(java.io.InputStream in)
Creates a new input stream with a default buffer size.
|
OpenJDK7GZIPInputStream(java.io.InputStream in,
int size)
Creates a new input stream with the specified buffer size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this input stream and releases any system resources associated
with the stream.
|
int |
read(byte[] buf,
int off,
int len)
Reads uncompressed data into an array of bytes.
|
protected int |
readHeader(java.io.InputStream this_in) |
protected boolean |
readTrailer() |
protected int |
readUByte(java.io.InputStream in) |
protected long |
readUInt(java.io.InputStream in) |
protected int |
readUShort(java.io.InputStream in) |
protected void |
skipBytes(java.io.InputStream in,
int n) |
available, fill, mark, markSupported, read, reset, skipprotected java.util.zip.CRC32 crc
protected boolean eos
public static final int GZIP_MAGIC
protected static final int FTEXT
protected static final int FHCRC
protected static final int FEXTRA
protected static final int FNAME
protected static final int FCOMMENT
public OpenJDK7GZIPInputStream(java.io.InputStream in,
int size)
throws java.io.IOException
in - the input streamsize - the input buffer sizejava.util.zip.ZipException - if a GZIP format error has occurred or the
compression method used is unsupportedjava.io.IOException - if an I/O error has occurredjava.lang.IllegalArgumentException - if size is <= 0public OpenJDK7GZIPInputStream(java.io.InputStream in)
throws java.io.IOException
in - the input streamjava.util.zip.ZipException - if a GZIP format error has occurred or the
compression method used is unsupportedjava.io.IOException - if an I/O error has occurredpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
len is not
zero, the method will block until some input can be decompressed; otherwise,
no bytes are read and 0 is returned.read in class OpenJDK7InflaterInputStreambuf - the buffer into which the data is readoff - the start offset in the destination array blen - the maximum number of bytes readjava.lang.NullPointerException - If buf is null.java.lang.IndexOutOfBoundsException - If off is negative,
len is negative, or len is greater than
buf.length - offjava.util.zip.ZipException - if the compressed input data is corrupt.java.io.IOException - if an I/O error has occurred.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class OpenJDK7InflaterInputStreamjava.io.IOException - if an I/O error has occurredprotected int readHeader(java.io.InputStream this_in)
throws java.io.IOException
java.io.IOExceptionprotected boolean readTrailer()
throws java.io.IOException
java.io.IOExceptionprotected long readUInt(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionprotected int readUShort(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionprotected int readUByte(java.io.InputStream in)
throws java.io.IOException
java.io.IOExceptionprotected void skipBytes(java.io.InputStream in,
int n)
throws java.io.IOException
java.io.IOExceptionCopyright © 2019 The International Internet Preservation Consortium. All Rights Reserved.