Top Description Fields Constructors Methods
org.eclipse.jetty.http2.hpack

public Class HpackDecoder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, java.util.function.LongSupplier, org.eclipse.jetty.http.HttpField, .HttpFields, .HttpHeader, .HttpTokens, .MetaData, org.eclipse.jetty.http.compression.EncodingException, .HuffmanDecoder, .NBitIntegerDecoder, org.eclipse.jetty.http2.hpack.HpackContext.Entry, org.eclipse.jetty.http2.hpack.internal.AuthorityHttpField, .MetaDataBuilder, org.eclipse.jetty.util.BufferUtil, .CharsetStringBuilder, org.slf4j.Logger, .LoggerFactory

Hpack Decoder

This is not thread safe and may only be called by 1 thread at a time.

Field Summary

Modifier and TypeField and Description
private final LongSupplier
private final MetaDataBuilder
private final HpackContext
private final HuffmanDecoder
private final NBitIntegerDecoder
private int
private static final Logger

Constructor Summary

AccessConstructor and Description
public
HpackDecoder(int
The maximum allowed size of a decoded headers block, expressed as total of all name and value bytes, plus 32 bytes per field
maxHeaderSize
,
LongSupplier
The supplier of a nano timestamp taken at the time the first byte was read
beginNanoTimeSupplier
)

Method Summary

Modifier and TypeMethod and Description
public MetaData
public HpackContext
public int
public int
private String
huffmanDecode(ByteBuffer buffer, int length)

private int
integerDecode(ByteBuffer buffer, int prefix)

public void
setMaxHeaderListSize(int maxHeaderListSize)

public void
setMaxTableCapacity(int
the limit for capacity of the dynamic header table
maxTableCapacity
)

Sets the limit for the capacity of the dynamic header table.

public static String
toISO88591String(ByteBuffer buffer, int length)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_beginNanoTimeSupplierback to summary
private final LongSupplier _beginNanoTimeSupplier
_builderback to summary
private final MetaDataBuilder _builder
_contextback to summary
private final HpackContext _context
_huffmanDecoderback to summary
private final HuffmanDecoder _huffmanDecoder
_integerDecoderback to summary
private final NBitIntegerDecoder _integerDecoder
_maxTableCapacityback to summary
private int _maxTableCapacity
LOGback to summary
private static final Logger LOG

Constructor Detail

HpackDecoderback to summary
public HpackDecoder(int maxHeaderSize, LongSupplier beginNanoTimeSupplier)
Parameters
maxHeaderSize:int

The maximum allowed size of a decoded headers block, expressed as total of all name and value bytes, plus 32 bytes per field

beginNanoTimeSupplier:LongSupplier

The supplier of a nano timestamp taken at the time the first byte was read

Method Detail

decodeback to summary
public MetaData decode(ByteBuffer buffer) throws SessionException, StreamException
getHpackContextback to summary
public HpackContext getHpackContext()
getMaxHeaderListSizeback to summary
public int getMaxHeaderListSize()
getMaxTableCapacityback to summary
public int getMaxTableCapacity()
huffmanDecodeback to summary
private String huffmanDecode(ByteBuffer buffer, int length) throws CompressionException
integerDecodeback to summary
private int integerDecode(ByteBuffer buffer, int prefix) throws CompressionException
setMaxHeaderListSizeback to summary
public void setMaxHeaderListSize(int maxHeaderListSize)
setMaxTableCapacityback to summary
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:int

the limit for capacity of the dynamic header table

toISO88591Stringback to summary
public static String toISO88591String(ByteBuffer buffer, int length)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override