final class SpdyHeaderBlockZlibDecoder extends SpdyHeaderBlockRawDecoder
| Modifier and Type | Field and Description |
|---|---|
private ByteBuf |
decompressed |
private java.util.zip.Inflater |
decompressor |
private static int |
DEFAULT_BUFFER_CAPACITY |
private static SpdyProtocolException |
INVALID_HEADER_BLOCK |
| Constructor and Description |
|---|
SpdyHeaderBlockZlibDecoder(SpdyVersion spdyVersion,
int maxHeaderSize) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
decode(ByteBufAllocator alloc,
ByteBuf headerBlock,
SpdyHeadersFrame frame)
Decodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame.
|
private int |
decompress(ByteBufAllocator alloc,
SpdyHeadersFrame frame) |
void |
end() |
(package private) void |
endHeaderBlock(SpdyHeadersFrame frame) |
private void |
ensureBuffer(ByteBufAllocator alloc) |
private void |
releaseBuffer() |
private int |
setInput(ByteBuf compressed) |
decodeHeaderBlocknewInstanceprivate static final int DEFAULT_BUFFER_CAPACITY
private static final SpdyProtocolException INVALID_HEADER_BLOCK
private final java.util.zip.Inflater decompressor
private ByteBuf decompressed
SpdyHeaderBlockZlibDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
void decode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
SpdyHeaderBlockDecoderdecode in class SpdyHeaderBlockRawDecoderalloc - the ByteBufAllocator which can be used to allocate new ByteBufsheaderBlock - the HeaderBlock to decodeframe - the Headers frame that receives the Name/Value pairsjava.lang.Exception - If the header block is malformed in a way that prevents any future
decoding of any other header blocks, an exception will be thrown.
A session error with status code PROTOCOL_ERROR must be issued.private int setInput(ByteBuf compressed)
private int decompress(ByteBufAllocator alloc, SpdyHeadersFrame frame) throws java.lang.Exception
java.lang.Exceptionprivate void ensureBuffer(ByteBufAllocator alloc)
void endHeaderBlock(SpdyHeadersFrame frame) throws java.lang.Exception
endHeaderBlock in class SpdyHeaderBlockRawDecoderjava.lang.Exceptionpublic void end()
end in class SpdyHeaderBlockRawDecoderprivate void releaseBuffer()