Class OptimizedGZIPInputStream
java.lang.Object
java.io.InputStream
com.ning.compress.gzip.OptimizedGZIPInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
Optimized variant of
GZIPInputStream that
reuses underlying Deflater instance}.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected intprotected intprotected final BufferRecyclerObject that handles details of buffer recyclingprotected final CRC32protected final GZIPRecyclerprotected Inflaterprotected InputStreamUnderlying input stream from which compressed data is to be read from.protected com.ning.compress.gzip.OptimizedGZIPInputStream.StateFlag set to true during handling of header processingprotected byte[]Temporary buffer used for single-byte reads, skipping. -
Constructor Summary
ConstructorsConstructorDescriptionOptimizedGZIPInputStream(InputStream in, BufferRecycler bufferRecycler, GZIPRecycler gzipRecycler) -
Method Summary
Methods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
_inflater
-
_crc
-
_bufferRecycler
Object that handles details of buffer recycling -
_gzipRecycler
-
_buffer
protected byte[] _buffer -
_bufferPtr
protected int _bufferPtr -
_bufferEnd
protected int _bufferEnd -
_tmpBuffer
protected byte[] _tmpBufferTemporary buffer used for single-byte reads, skipping. -
_rawInput
Underlying input stream from which compressed data is to be read from. -
_state
protected com.ning.compress.gzip.OptimizedGZIPInputStream.State _stateFlag set to true during handling of header processing
-
-
Constructor Details
-
OptimizedGZIPInputStream
- Throws:
IOException
-
OptimizedGZIPInputStream
public OptimizedGZIPInputStream(InputStream in, BufferRecycler bufferRecycler, GZIPRecycler gzipRecycler) throws IOException - Throws:
IOException
-
-
Method Details
-
available
public int available()- Overrides:
availablein classInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int limit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
_getTmpBuffer
protected byte[] _getTmpBuffer() -
_readHeader
- Throws:
IOException
-
_readTrailer
- Throws:
IOException
-