Class SpdyHeaderBlockRawDecoder
java.lang.Object
io.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
io.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
- Direct Known Subclasses:
SpdyHeaderBlockZlibDecoder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufprivate intprivate intprivate static final intprivate final intprivate java.lang.Stringprivate intprivate SpdyHeaderBlockRawDecoder.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voiddecode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) Decodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame.protected voiddecodeHeaderBlock(ByteBuf headerBlock, SpdyHeadersFrame frame) (package private) voidend()(package private) voidendHeaderBlock(SpdyHeadersFrame frame) private static intreadLengthField(ByteBuf buffer) private voidMethods inherited from class SpdyHeaderBlockDecoder
newInstanceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
LENGTH_FIELD_SIZE
private static final int LENGTH_FIELD_SIZE- See Also:
-
maxHeaderSize
private final int maxHeaderSize -
state
-
cumulation
-
headerSize
private int headerSize -
numHeaders
private int numHeaders -
length
private int length -
name
private java.lang.String name
-
-
Constructor Details
-
SpdyHeaderBlockRawDecoder
-
-
Method Details
-
readLengthField
-
decode
void decode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception Description copied from class:SpdyHeaderBlockDecoderDecodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame. If the header block is malformed, the Headers frame will be marked as invalid. A stream error with status code PROTOCOL_ERROR must be issued in response to an invalid frame.- Specified by:
decodein classSpdyHeaderBlockDecoder- Parameters:
alloc- theByteBufAllocatorwhich can be used to allocate newByteBufsheaderBlock- the HeaderBlock to decodeframe- the Headers frame that receives the Name/Value pairs- Throws:
java.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.
-
decodeHeaderBlock
protected void decodeHeaderBlock(ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception - Throws:
java.lang.Exception
-
endHeaderBlock
- Specified by:
endHeaderBlockin classSpdyHeaderBlockDecoder- Throws:
java.lang.Exception
-
end
void end()- Specified by:
endin classSpdyHeaderBlockDecoder
-
releaseBuffer
private void releaseBuffer()
-