public class SpdyHeaderBlockRawDecoder extends SpdyHeaderBlockDecoder
Modifier and Type | Class and Description |
---|---|
private static class |
SpdyHeaderBlockRawDecoder.State |
Modifier and Type | Field and Description |
---|---|
private ByteBuf |
cumulation |
private int |
headerSize |
private int |
length |
private static int |
LENGTH_FIELD_SIZE |
private int |
maxHeaderSize |
private java.lang.String |
name |
private int |
numHeaders |
private SpdyHeaderBlockRawDecoder.State |
state |
Constructor and Description |
---|
SpdyHeaderBlockRawDecoder(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.
|
protected void |
decodeHeaderBlock(ByteBuf headerBlock,
SpdyHeadersFrame frame) |
(package private) void |
end() |
(package private) void |
endHeaderBlock(SpdyHeadersFrame frame) |
private static int |
readLengthField(ByteBuf buffer) |
private void |
releaseBuffer() |
newInstance
private static final int LENGTH_FIELD_SIZE
private final int maxHeaderSize
private SpdyHeaderBlockRawDecoder.State state
private ByteBuf cumulation
private int headerSize
private int numHeaders
private int length
private java.lang.String name
public SpdyHeaderBlockRawDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
private static int readLengthField(ByteBuf buffer)
void decode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
SpdyHeaderBlockDecoder
decode
in class SpdyHeaderBlockDecoder
alloc
- the ByteBufAllocator
which can be used to allocate new ByteBuf
sheaderBlock
- 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.protected void decodeHeaderBlock(ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
java.lang.Exception
void endHeaderBlock(SpdyHeadersFrame frame) throws java.lang.Exception
endHeaderBlock
in class SpdyHeaderBlockDecoder
java.lang.Exception
void end()
end
in class SpdyHeaderBlockDecoder
private void releaseBuffer()