public class GZIPContentDecoder extends Object implements ContentDecoder
ContentDecoder
for the "gzip" encoding.Modifier and Type | Class and Description |
---|---|
static class |
GZIPContentDecoder.Factory
Specialized
ContentDecoder.Factory for the "gzip" encoding. |
Constructor and Description |
---|
GZIPContentDecoder() |
GZIPContentDecoder(int bufferSize) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
decode(ByteBuffer buffer)
Decodes the bytes in the given
buffer and returns decoded bytes, if any. |
protected boolean |
isFinished() |
public GZIPContentDecoder()
public GZIPContentDecoder(int bufferSize)
public ByteBuffer decode(ByteBuffer buffer)
Decodes the bytes in the given buffer
and returns decoded bytes, if any.
If the decoding did not produce any output, for example because it consumed gzip header or trailer bytes, it returns a buffer with zero capacity.
This method never returns null.
The given buffer
's position will be modified to reflect the bytes consumed during
the decoding.
The decoding may be finished without consuming the buffer completely if the buffer contains gzip bytes plus other bytes (either plain or gzipped).
decode
in interface ContentDecoder
buffer
- the buffer containing encoded bytesprotected boolean isFinished()
Copyright © 1995-2015 Webtide. All Rights Reserved.