Package dev.relism.flash.http2.hpack
Class HpackEncoder
java.lang.Object
dev.relism.flash.http2.hpack.HpackEncoder
Stateless HPACK encoder for response header blocks. It uses the RFC 7541 static table and literal
fields without indexing; consequently, concurrent streams never share mutable encoder state.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeclares that this endpoint will not use an encoder-side dynamic table.static voidwriteIndexed(ByteWriter out, int staticIndex) static voidwriteLiteral(ByteWriter out, byte[] name, byte[] value) static voidwriteLiteral(ByteWriter out, byte[] name, int nameOff, int nameLen, byte[] value, int valueOff, int valueLen, boolean huffmanValue) static voidwriteLiteral(ByteWriter out, dev.relism.fpr.core.ByteView name, dev.relism.fpr.core.ByteView value) Writes a non-indexed literal directly from protocol-neutral byte views.static voidwriteLiteralNeverIndexed(ByteWriter out, byte[] name, byte[] value, boolean huffmanValue) static voidwriteLiteralNeverIndexedWithNameIndex(ByteWriter out, int nameIndex, byte[] value, boolean huffmanValue) static voidwriteLiteralWithNameIndex(ByteWriter out, int nameIndex, byte[] value, boolean huffmanValue) static voidwriteLiteralWithNameIndex(ByteWriter out, int nameIndex, byte[] value, int valueOff, int valueLen, boolean huffmanValue)
-
Method Details
-
writeDynamicTableSizeUpdateZero
Declares that this endpoint will not use an encoder-side dynamic table. -
writeIndexed
-
writeLiteral
-
writeLiteral
public static void writeLiteral(ByteWriter out, dev.relism.fpr.core.ByteView name, dev.relism.fpr.core.ByteView value) Writes a non-indexed literal directly from protocol-neutral byte views. -
writeLiteral
public static void writeLiteral(ByteWriter out, byte[] name, int nameOff, int nameLen, byte[] value, int valueOff, int valueLen, boolean huffmanValue) -
writeLiteralWithNameIndex
public static void writeLiteralWithNameIndex(ByteWriter out, int nameIndex, byte[] value, boolean huffmanValue) -
writeLiteralWithNameIndex
public static void writeLiteralWithNameIndex(ByteWriter out, int nameIndex, byte[] value, int valueOff, int valueLen, boolean huffmanValue) -
writeLiteralNeverIndexed
public static void writeLiteralNeverIndexed(ByteWriter out, byte[] name, byte[] value, boolean huffmanValue) -
writeLiteralNeverIndexedWithNameIndex
public static void writeLiteralNeverIndexedWithNameIndex(ByteWriter out, int nameIndex, byte[] value, boolean huffmanValue)
-