Class Decoder


  • public final class Decoder
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Decoder​(int maxHeaderSize, int maxHeaderTableSize)
      Creates a new decoder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void decode​(java.io.InputStream in, HeaderListener headerListener)
      Decode the header block into header fields.
      boolean endHeaderBlock()
      End the current header block.
      int getMaxHeaderTableSize()
      Return the maximum table size.
      void setMaxHeaderTableSize​(int maxHeaderTableSize)
      Set the maximum table size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Decoder

        public Decoder​(int maxHeaderSize,
                       int maxHeaderTableSize)
        Creates a new decoder.
    • Method Detail

      • decode

        public void decode​(java.io.InputStream in,
                           HeaderListener headerListener)
                    throws java.io.IOException
        Decode the header block into header fields.
        Throws:
        java.io.IOException
      • endHeaderBlock

        public boolean endHeaderBlock()
        End the current header block. Returns if the header field has been truncated. This must be called after the header block has been completely decoded.
      • setMaxHeaderTableSize

        public void setMaxHeaderTableSize​(int maxHeaderTableSize)
        Set the maximum table size. If this is below the maximum size of the dynamic table used by the encoder, the beginning of the next header block MUST signal this change.
      • getMaxHeaderTableSize

        public int getMaxHeaderTableSize()
        Return the maximum table size. This is the maximum size allowed by both the encoder and the decoder.