/** * Handle an indexed header representation * * @param index The index * @throws HpackException */ private void handleIndex(int index) throws HpackException { if (index <= Hpack.STATIC_TABLE_LENGTH) { addStaticTableEntry(index); } else { int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); HeaderField headerField = headerTable[adjustedIndex]; headerEmitter.emitHeader(headerField.name, headerField.value, false); } }
/** * Handle an indexed header representation * * @param index The index * @throws HpackException */ private void handleIndex(int index) throws HpackException { if (index <= Hpack.STATIC_TABLE_LENGTH) { addStaticTableEntry(index); } else { int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); HeaderField headerField = headerTable[adjustedIndex]; headerEmitter.emitHeader(headerField.name, headerField.value, false); } }
private void addStaticTableEntry(int index) throws HpackException { //adds an entry from the static table. HeaderField entry = Hpack.STATIC_TABLE[index]; headerEmitter.emitHeader(entry.name, entry.value == null ? "" : entry.value, false); }
private void addStaticTableEntry(int index) throws HpackException { //adds an entry from the static table. HeaderField entry = Hpack.STATIC_TABLE[index]; headerEmitter.emitHeader(entry.name, entry.value == null ? "" : entry.value, false); }
/** * Handle an indexed header representation * * @param index The index * @throws HpackException */ private void handleIndex(int index) throws HpackException { if (index <= Hpack.STATIC_TABLE_LENGTH) { addStaticTableEntry(index); } else { int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); HeaderField headerField = headerTable[adjustedIndex]; headerEmitter.emitHeader(headerField.name, headerField.value, false); } }
private void addStaticTableEntry(int index) throws HpackException { //adds an entry from the static table. HeaderField entry = Hpack.STATIC_TABLE[index]; headerEmitter.emitHeader(entry.name, entry.value == null ? "" : entry.value, false); }