decoding operation
.
Methods of the callback are never called by a decoder with any of the
arguments being null
.
API Note
The callback provides methods for all possible binary representations. This could be useful for implementing an intermediary, logging, debugging, etc.
The callback is an interface in order to interoperate with lambdas (in the most common use case):
DecodingCallback callback = (name, value) -> System.out.println(name + ", " + value);
Names and values are CharSequence
s rather than String
s in
order to allow users to decide whether or not they need to create objects. A
CharSequence
might be used in-place, for example, to be appended to
an Appendable
(e.g. StringBuilder
) and then discarded.
That said, if a passed CharSequence
needs to outlast the method
call, it needs to be copied.
Modifier and Type | Method and Description |
---|---|
public void | onDecoded(CharSequence
header name name, CharSequence header value value)A method the more specific methods of the callback forward their calls to. |
public default void | onDecoded(CharSequence
header name name, CharSequence header value value, boolean whether or not the value is sensitive sensitive)A more finer-grained version of |
public default void | onIndexed(int
index of an entry in the table index, CharSequence header name name, CharSequence header value value)An Indexed Header Field decoded. |
public default void | onLiteral(int
index of an entry in the table index, CharSequence header name name, CharSequence header value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field without Indexing decoded, where a |
public default void | onLiteral(CharSequence
header name name, boolean if the nameHuffman, CharSequence name was Huffman encodedheader value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field without Indexing decoded, where both a |
public default void | onLiteralNeverIndexed(int
index of an entry in the table index, CharSequence header name name, CharSequence header value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field Never Indexed decoded, where a |
public default void | onLiteralNeverIndexed(CharSequence
header name name, boolean if the nameHuffman, CharSequence name was Huffman encodedheader value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field Never Indexed decoded, where both a |
public default void | onLiteralWithIndexing(int
index of an entry in the table index, CharSequence header name name, CharSequence header value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field with Incremental Indexing decoded, where a |
public default void | onLiteralWithIndexing(CharSequence
header name name, boolean if the nameHuffman, CharSequence name was Huffman encodedheader value value, boolean if the valueHuffman)value was Huffman encodedA Literal
Header Field with Incremental Indexing decoded, where both a |
public default void |
onDecoded | back to summary |
---|---|
public void onDecoded(CharSequence name, CharSequence value) A method the more specific methods of the callback forward their calls to.
|
onDecoded | back to summary |
---|---|
public default void onDecoded(CharSequence name, CharSequence value, boolean sensitive) A more finer-grained version of Value sensitivity must be considered, for example, when implementing
an intermediary. A It is required that intermediaries MUST use the same representation for encoding this header field in order to protect its value which is not to be put at risk by compressing it. Implementation Specification The default implementation invokes
|
onIndexed | back to summary |
---|---|
public default void onIndexed(int index, CharSequence name, CharSequence value) An Indexed Header Field decoded. Implementation Specification The default implementation invokes
|
onLiteral | back to summary |
---|---|
public default void onLiteral(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal
Header Field without Indexing decoded, where a Implementation Specification The default implementation invokes
|
onLiteral | back to summary |
---|---|
public default void onLiteral(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal
Header Field without Indexing decoded, where both a Implementation Specification The default implementation invokes
|
onLiteralNeverIndexed | back to summary |
---|---|
public default void onLiteralNeverIndexed(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal
Header Field Never Indexed decoded, where a Implementation Specification The default implementation invokes
|
onLiteralNeverIndexed | back to summary |
---|---|
public default void onLiteralNeverIndexed(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal
Header Field Never Indexed decoded, where both a Implementation Specification The default implementation invokes
|
onLiteralWithIndexing | back to summary |
---|---|
public default void onLiteralWithIndexing(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal
Header Field with Incremental Indexing decoded, where a Implementation Specification The default implementation invokes
|
onLiteralWithIndexing | back to summary |
---|---|
public default void onLiteralWithIndexing(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal
Header Field with Incremental Indexing decoded, where both a Implementation Specification The default implementation invokes
|
onSizeUpdate | back to summary |
---|---|
public default void onSizeUpdate(int capacity) A Dynamic Table Size Update decoded. Implementation Specification The default implementation does nothing.
|