Package org.eclipse.jetty.http2.hpack
Class HpackDecoder
- java.lang.Object
-
- org.eclipse.jetty.http2.hpack.HpackDecoder
-
public class HpackDecoder extends java.lang.Object
Hpack DecoderThis is not thread safe and may only be called by 1 thread at a time.
-
-
Field Summary
Fields Modifier and Type Field Description private MetaDataBuilder
_builder
private HpackContext
_context
private org.eclipse.jetty.http.compression.HuffmanDecoder
_huffmanDecoder
private org.eclipse.jetty.http.compression.NBitIntegerDecoder
_integerDecoder
private int
_maxTableCapacity
static org.eclipse.jetty.http.HttpField.LongValueHttpField
CONTENT_LENGTH_0
static org.eclipse.jetty.util.log.Logger
LOG
-
Constructor Summary
Constructors Constructor Description HpackDecoder(int maxHeaderSize)
HpackDecoder(int localMaxDynamicTableSize, int maxHeaderSize)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.eclipse.jetty.http.MetaData
decode(java.nio.ByteBuffer buffer)
HpackContext
getHpackContext()
int
getMaxHeaderListSize()
int
getMaxTableCapacity()
private java.lang.String
huffmanDecode(java.nio.ByteBuffer buffer, int length)
private int
integerDecode(java.nio.ByteBuffer buffer, int prefix)
void
setLocalMaxDynamicTableSize(int maxTableSizeLimit)
Deprecated.usesetMaxTableCapacity(int)
insteadvoid
setMaxHeaderListSize(int maxHeaderListSize)
void
setMaxTableCapacity(int maxTableCapacity)
Sets the limit for the capacity of the dynamic header table.static java.lang.String
toISO88591String(java.nio.ByteBuffer buffer, int length)
java.lang.String
toString()
-
-
-
Field Detail
-
LOG
public static final org.eclipse.jetty.util.log.Logger LOG
-
CONTENT_LENGTH_0
public static final org.eclipse.jetty.http.HttpField.LongValueHttpField CONTENT_LENGTH_0
-
_context
private final HpackContext _context
-
_builder
private final MetaDataBuilder _builder
-
_huffmanDecoder
private final org.eclipse.jetty.http.compression.HuffmanDecoder _huffmanDecoder
-
_integerDecoder
private final org.eclipse.jetty.http.compression.NBitIntegerDecoder _integerDecoder
-
_maxTableCapacity
private int _maxTableCapacity
-
-
Constructor Detail
-
HpackDecoder
@Deprecated public HpackDecoder(int localMaxDynamicTableSize, int maxHeaderSize)
Deprecated.
-
HpackDecoder
public HpackDecoder(int maxHeaderSize)
- Parameters:
maxHeaderSize
- The maximum allowed size of a decoded headers block, expressed as total of all name and value bytes, plus 32 bytes per field
-
-
Method Detail
-
getHpackContext
public HpackContext getHpackContext()
-
getMaxTableCapacity
public int getMaxTableCapacity()
-
setMaxTableCapacity
public void setMaxTableCapacity(int maxTableCapacity)
Sets the limit for the capacity of the dynamic header table.
This value acts as a limit for the values received from the remote peer via the HPACK dynamic table size update instruction.
After calling this method, a SETTINGS frame must be sent to the other peer, containing the
SETTINGS_HEADER_TABLE_SIZE
setting with the value passed as argument to this method.- Parameters:
maxTableCapacity
- the limit for capacity of the dynamic header table
-
setLocalMaxDynamicTableSize
@Deprecated public void setLocalMaxDynamicTableSize(int maxTableSizeLimit)
Deprecated.usesetMaxTableCapacity(int)
instead- Parameters:
maxTableSizeLimit
- the local dynamic table max size
-
getMaxHeaderListSize
public int getMaxHeaderListSize()
-
setMaxHeaderListSize
public void setMaxHeaderListSize(int maxHeaderListSize)
-
decode
public org.eclipse.jetty.http.MetaData decode(java.nio.ByteBuffer buffer) throws HpackException.SessionException, HpackException.StreamException
-
integerDecode
private int integerDecode(java.nio.ByteBuffer buffer, int prefix) throws HpackException.CompressionException
-
huffmanDecode
private java.lang.String huffmanDecode(java.nio.ByteBuffer buffer, int length) throws HpackException.CompressionException
-
toISO88591String
public static java.lang.String toISO88591String(java.nio.ByteBuffer buffer, int length)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-