ContentDecoder, Destroyablepublic class GZIPContentDecoder extends java.lang.Object implements ContentDecoder, Destroyable
ContentDecoder for the "gzip" encoding.| Modifier and Type | Class | Description |
|---|---|---|
static class |
GZIPContentDecoder.Factory |
Specialized
ContentDecoder.Factory for the "gzip" encoding. |
| Constructor | Description |
|---|---|
GZIPContentDecoder() |
|
GZIPContentDecoder(int bufferSize) |
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.ByteBuffer |
decode(java.nio.ByteBuffer buffer) |
Decodes the bytes in the given
buffer and returns decoded bytes, if any. |
void |
destroy() |
|
protected boolean |
isFinished() |
public GZIPContentDecoder()
public GZIPContentDecoder(int bufferSize)
public java.nio.ByteBuffer decode(java.nio.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 ContentDecoderbuffer - the buffer containing encoded bytespublic void destroy()
destroy in interface Destroyableprotected boolean isFinished()
Copyright © 1995–2017 Webtide. All rights reserved.