Class SpdyHeaderBlockZlibDecoder
java.lang.Object
io.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
io.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
io.netty.handler.codec.spdy.SpdyHeaderBlockZlibDecoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufprivate final Inflaterprivate static final intprivate static final SpdyProtocolExceptionprivate static final intprivate final longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static longcalculateMaxDecompressedSizePerBlock(int maxHeaderSize) (package private) voiddecode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) Decodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame.private intdecompress(ByteBufAllocator alloc, SpdyHeadersFrame frame) voidend()(package private) voidendHeaderBlock(SpdyHeadersFrame frame) private voidensureBuffer(ByteBufAllocator alloc) private voidprivate intMethods inherited from class SpdyHeaderBlockRawDecoder
decodeHeaderBlockMethods inherited from class SpdyHeaderBlockDecoder
newInstance
-
Field Details
-
DEFAULT_BUFFER_CAPACITY
private static final int DEFAULT_BUFFER_CAPACITY- See Also:
-
INVALID_HEADER_BLOCK
-
MAX_DECOMPRESSED_SIZE_MULTIPLIER
private static final int MAX_DECOMPRESSED_SIZE_MULTIPLIER- See Also:
-
decompressor
-
maxDecompressedSize
private final long maxDecompressedSize -
decompressed
-
totalInflated
private long totalInflated
-
-
Constructor Details
-
SpdyHeaderBlockZlibDecoder
SpdyHeaderBlockZlibDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
-
-
Method Details
-
calculateMaxDecompressedSizePerBlock
static long calculateMaxDecompressedSizePerBlock(int maxHeaderSize) -
decode
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.- Overrides:
decodein classSpdyHeaderBlockRawDecoder- Parameters:
alloc- theByteBufAllocatorwhich can be used to allocate newByteBufsheaderBlock- the HeaderBlock to decodeframe- the Headers frame that receives the Name/Value pairs- Throws:
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.
-
setInput
-
decompress
- Throws:
Exception
-
ensureBuffer
-
endHeaderBlock
- Overrides:
endHeaderBlockin classSpdyHeaderBlockRawDecoder- Throws:
Exception
-
end
public void end()- Overrides:
endin classSpdyHeaderBlockRawDecoder
-
releaseBuffer
private void releaseBuffer()
-