Class SpdyHeaderBlockRawDecoder

java.lang.Object
io.netty.handler.codec.spdy.SpdyHeaderBlockDecoder
io.netty.handler.codec.spdy.SpdyHeaderBlockRawDecoder
Direct Known Subclasses:
SpdyHeaderBlockZlibDecoder

public class SpdyHeaderBlockRawDecoder extends SpdyHeaderBlockDecoder
  • Field Details

    • LENGTH_FIELD_SIZE

      private static final int LENGTH_FIELD_SIZE
      See Also:
    • maxHeaderSize

      private final int maxHeaderSize
    • state

    • cumulation

      private ByteBuf cumulation
    • headerSize

      private int headerSize
    • numHeaders

      private int numHeaders
    • length

      private int length
    • name

      private java.lang.String name
  • Constructor Details

    • SpdyHeaderBlockRawDecoder

      public SpdyHeaderBlockRawDecoder(SpdyVersion spdyVersion, int maxHeaderSize)
  • Method Details

    • readLengthField

      private static int readLengthField(ByteBuf buffer)
    • decode

      void decode(ByteBufAllocator alloc, ByteBuf headerBlock, SpdyHeadersFrame frame) throws java.lang.Exception
      Description copied from class: SpdyHeaderBlockDecoder
      Decodes 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:
      decode in class SpdyHeaderBlockDecoder
      Parameters:
      alloc - the ByteBufAllocator which can be used to allocate new ByteBufs
      headerBlock - the HeaderBlock to decode
      frame - 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

      void endHeaderBlock(SpdyHeadersFrame frame) throws java.lang.Exception
      Specified by:
      endHeaderBlock in class SpdyHeaderBlockDecoder
      Throws:
      java.lang.Exception
    • end

      void end()
      Specified by:
      end in class SpdyHeaderBlockDecoder
    • releaseBuffer

      private void releaseBuffer()