Top Inners Fields Constructors Methods
io.undertow.protocols.http2

pack-priv final Class Hpack

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, io.undertow.UndertowMessages, io.undertow.util.HttpString

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final int
private static final byte
private static final int
private static final int[]
PREFIX_TABLE

table that contains powers of two, used as both bitmask and to quickly calculate 2^n

pack-priv static final Hpack.HeaderField[]
pack-priv static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static int

Returns:

The encoded integer, or -1 if there was not enough data
decodeInteger
(ByteBuffer
The buffer that contains the integer
source
,
int
The encoding prefix length
n
)

Decodes an integer in the HPACK prefex format.

pack-priv static void
encodeInteger(ByteBuffer
The buffer that contains the integer
source
,
int
The integer to encode
value
,
int
The encoding prefix length
n
)

Encodes an integer in the HPACK prefix format.

pack-priv static byte
toLower(byte b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_TABLE_SIZEback to summary
pack-priv static final int DEFAULT_TABLE_SIZE
LOWER_DIFFback to summary
private static final byte LOWER_DIFF
MAX_INTEGER_OCTETSback to summary
private static final int MAX_INTEGER_OCTETS
PREFIX_TABLEback to summary
private static final int[] PREFIX_TABLE

table that contains powers of two, used as both bitmask and to quickly calculate 2^n

STATIC_TABLEback to summary
pack-priv static final Hpack.HeaderField[] STATIC_TABLE
STATIC_TABLE_LENGTHback to summary
pack-priv static final int STATIC_TABLE_LENGTH

Constructor Detail

Hpackback to summary
private Hpack()

Method Detail

decodeIntegerback to summary
pack-priv static int decodeInteger(ByteBuffer source, int n) throws HpackException

Decodes an integer in the HPACK prefex format. If the return value is -1 it means that there was not enough data in the buffer to complete the decoding sequence.

If this method returns -1 then the source buffer will not have been modified.

Parameters
source:ByteBuffer

The buffer that contains the integer

n:int

The encoding prefix length

Returns:int

The encoded integer, or -1 if there was not enough data

encodeIntegerback to summary
pack-priv static void encodeInteger(ByteBuffer source, int value, int n)

Encodes an integer in the HPACK prefix format.

This method assumes that the buffer has already had the first 8-n bits filled. As such it will modify the last byte that is already present in the buffer, and potentially add more if required

Parameters
source:ByteBuffer

The buffer that contains the integer

value:int

The integer to encode

n:int

The encoding prefix length

toLowerback to summary
pack-priv static byte toLower(byte b)
io.undertow.protocols.http2 back to summary

pack-priv Class Hpack.HeaderField

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final HttpString
pack-priv final int
pack-priv final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
pack-priv final HttpString name
sizeback to summary
pack-priv final int size
valueback to summary
pack-priv final String value

Constructor Detail

HeaderFieldback to summary
pack-priv HeaderField(HttpString name, String value)