Class SpdyHeaderBlockZlibDecoder
- java.lang.Object
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
-
- org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockZlibDecoder
-
final class SpdyHeaderBlockZlibDecoder extends SpdyHeaderBlockRawDecoder
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelBufferdecompressedprivate java.util.zip.Inflaterdecompressorprivate static intDEFAULT_BUFFER_CAPACITYprivate static SpdyProtocolExceptionINVALID_HEADER_BLOCK
-
Constructor Summary
Constructors Constructor Description SpdyHeaderBlockZlibDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddecode(ChannelBuffer headerBlock, SpdyHeadersFrame frame)Decodes a SPDY Header Block, adding the Name/Value pairs to the given Headers frame.private intdecompress(SpdyHeadersFrame frame)voidend()(package private) voidendHeaderBlock(SpdyHeadersFrame frame)private voidensureBuffer()private intsetInput(ChannelBuffer compressed)-
Methods inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
decodeHeaderBlock
-
Methods inherited from class org.jboss.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
newInstance
-
-
-
-
Field Detail
-
DEFAULT_BUFFER_CAPACITY
private static final int DEFAULT_BUFFER_CAPACITY
- See Also:
- Constant Field Values
-
INVALID_HEADER_BLOCK
private static final SpdyProtocolException INVALID_HEADER_BLOCK
-
decompressor
private final java.util.zip.Inflater decompressor
-
decompressed
private ChannelBuffer decompressed
-
-
Constructor Detail
-
SpdyHeaderBlockZlibDecoder
SpdyHeaderBlockZlibDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
-
-
Method Detail
-
decode
void decode(ChannelBuffer 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.- Overrides:
decodein classSpdyHeaderBlockRawDecoder- Parameters:
headerBlock- 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.
-
setInput
private int setInput(ChannelBuffer compressed)
-
decompress
private int decompress(SpdyHeadersFrame frame) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ensureBuffer
private void ensureBuffer()
-
endHeaderBlock
void endHeaderBlock(SpdyHeadersFrame frame) throws java.lang.Exception
- Overrides:
endHeaderBlockin classSpdyHeaderBlockRawDecoder- Throws:
java.lang.Exception
-
end
public void end()
- Overrides:
endin classSpdyHeaderBlockRawDecoder
-
-