private class GzipHttpInputInterceptor.Decoder extends GZIPContentDecoder
Modifier | Constructor and Description |
---|---|
private |
Decoder(ByteBufferPool pool,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
decodeChunks(java.nio.ByteBuffer compressed)
Inflates compressed data.
|
protected boolean |
decodedChunk(java.nio.ByteBuffer chunk)
Called when a chunk of data is inflated.
|
acquire, decode, destroy, isFinished, release
private Decoder(ByteBufferPool pool, int bufferSize)
protected boolean decodedChunk(java.nio.ByteBuffer chunk)
GZIPContentDecoder
Called when a chunk of data is inflated.
The default implementation aggregates all the chunks
into a single buffer returned from GZIPContentDecoder.decode(ByteBuffer)
.
Derived implementations may choose to consume inflated chunks
individually and return true
from this method to prevent
further inflation until a subsequent call to GZIPContentDecoder.decode(ByteBuffer)
or GZIPContentDecoder.decodeChunks(ByteBuffer)
is made.
decodedChunk
in class GZIPContentDecoder
chunk
- the inflated chunk of dataGZIPContentDecoder.decodeChunks(ByteBuffer)
or GZIPContentDecoder.decode(ByteBuffer)
should return, allowing to consume the inflated chunk and apply
backpressurepublic void decodeChunks(java.nio.ByteBuffer compressed)
GZIPContentDecoder
Inflates compressed data.
Inflation continues until the compressed block end is reached, there is no
more compressed data or a call to GZIPContentDecoder.decodedChunk(ByteBuffer)
returns true.
decodeChunks
in class GZIPContentDecoder
compressed
- the buffer of compressed data to inflate