| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private int | currentMemorySize
the current calculates memory size, as per the HPACK algorithm |
| private static final int | |
| private int | filledTableSlots
The current table size by index (aka the number of index positions that are filled up) |
| private boolean | |
| private int | firstSlotPosition
The current HEAD position of the header table. |
| private HpackDecoder. | headerEmitter
The object that receives the headers that are emitted from this decoder |
| private Hpack. | headerTable
The header table |
| private final int | maxAllowedMemorySize
The maximum allowed memory size, as specified by us. |
| private int | specifiedMemorySize
The current memory size, as specified by the client |
| private final StringBuilder |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | |
| public void | |
| pack-priv int | |
| pack-priv int | |
| pack-priv int | |
| public HpackDecoder. | |
| pack-priv Hpack. | |
| pack-priv int | Returns: the real index into the arrayThe index from the hpack index)because we use a ring buffer type construct, and don't actually shuffle items in the array, we need to figure out he real index to use. |
| pack-priv int | |
| private void | |
| private HttpString | |
| private boolean | |
| private HttpString | |
| private String | |
| private String | |
| private void | |
| public void |
| currentMemorySize | back to summary |
|---|---|
| private int currentMemorySize the current calculates memory size, as per the HPACK algorithm | |
| DEFAULT_RING_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_RING_BUFFER_SIZE | |
| filledTableSlots | back to summary |
|---|---|
| private int filledTableSlots The current table size by index (aka the number of index positions that are filled up) | |
| first | back to summary |
|---|---|
| private boolean first | |
| firstSlotPosition | back to summary |
|---|---|
| private int firstSlotPosition The current HEAD position of the header table. We use a ring buffer type construct as it would be silly to actually shuffle the items around in the array. | |
| headerEmitter | back to summary |
|---|---|
| private HpackDecoder. The object that receives the headers that are emitted from this decoder | |
| headerTable | back to summary |
|---|---|
| private Hpack. The header table | |
| maxAllowedMemorySize | back to summary |
|---|---|
| private final int maxAllowedMemorySize The maximum allowed memory size, as specified by us. If the client tries to increase beyond this amount it is an error | |
| specifiedMemorySize | back to summary |
|---|---|
| private int specifiedMemorySize The current memory size, as specified by the client | |
| stringBuilder | back to summary |
|---|---|
| private final StringBuilder stringBuilder | |
| HpackDecoder | back to summary |
|---|---|
| public HpackDecoder(int maxAllowedMemorySize) | |
| HpackDecoder | back to summary |
|---|---|
| public HpackDecoder() | |
| addEntryToHeaderTable | back to summary |
|---|---|
| private void addEntryToHeaderTable(Hpack. | |
| addStaticTableEntry | back to summary |
|---|---|
| private void addStaticTableEntry(int index) throws HpackException | |
| decode | back to summary |
|---|---|
| public void decode(ByteBuffer buffer, boolean moreData) throws HpackException Decodes the provided frame data. If this method leaves data in the buffer then this buffer should be compacted so this data is preserved, unless there is no more data in which case this should be considered a protocol error.
| |
| getCurrentMemorySize | back to summary |
|---|---|
| pack-priv int getCurrentMemorySize() | |
| getFilledTableSlots | back to summary |
|---|---|
| pack-priv int getFilledTableSlots() | |
| getFirstSlotPosition | back to summary |
|---|---|
| pack-priv int getFirstSlotPosition() | |
| getHeaderEmitter | back to summary |
|---|---|
| public HpackDecoder. | |
| getHeaderTable | back to summary |
|---|---|
| pack-priv Hpack. | |
| getRealIndex | back to summary |
|---|---|
| pack-priv int getRealIndex(int index) throws HpackException because we use a ring buffer type construct, and don't actually shuffle items in the array, we need to figure out he real index to use. package private for unit tests
| |
| getSpecifiedMemorySize | back to summary |
|---|---|
| pack-priv int getSpecifiedMemorySize() | |
| handleIndex | back to summary |
|---|---|
| private void handleIndex(int index) throws HpackException Handle an indexed header representation
| |
| handleIndexedHeaderName | back to summary |
|---|---|
| private HttpString handleIndexedHeaderName(int index) throws HpackException | |
| handleMaxMemorySizeChange | back to summary |
|---|---|
| private boolean handleMaxMemorySizeChange(ByteBuffer buffer, int originalPos) throws HpackException | |
| readHeaderName | back to summary |
|---|---|
| private HttpString readHeaderName(ByteBuffer buffer, int prefixLength) throws HpackException | |
| readHpackString | back to summary |
|---|---|
| private String readHpackString(ByteBuffer buffer) throws HpackException | |
| readHuffmanString | back to summary |
|---|---|
| private String readHuffmanString(int length, ByteBuffer buffer) throws HpackException | |
| resizeIfRequired | back to summary |
|---|---|
| private void resizeIfRequired() | |
| setHeaderEmitter | back to summary |
|---|---|
| public void setHeaderEmitter(HpackDecoder. | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| emitHeader | back to summary |
|---|---|
| public void emitHeader(HttpString name, String value, boolean neverIndex) throws HpackException | |