decoding operation.
Methods of the callback are never called by a decoder with any of the arguments being null.
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):
{
@code
DecodingCallback callback = (name, value) -> System.out.println(name + ", " + value);
}
Names and values are CharSequences rather than Strings 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.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | onDecoded(CharSequence
header name name, CharSequence header value value)A method the more specific methods of the callback forward their calls to. |
| public 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 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 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 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 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 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 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 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 void |
| DecodingCallback | back to summary |
|---|---|
| public DecodingCallback() | |
| onDecoded | back to summary |
|---|---|
| public abstract void onDecoded(CharSequence name, CharSequence value) A method the more specific methods of the callback forward their calls to.
| |
| onDecoded | back to summary |
|---|---|
| public 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.
The default implementation invokes
| |
| onIndexed | back to summary |
|---|---|
| public void onIndexed(int index, CharSequence name, CharSequence value) An Indexed Header Field decoded.
The default implementation invokes
| |
| onLiteral | back to summary |
|---|---|
| public void onLiteral(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal Header Field without Indexing decoded,
where a
The default implementation invokes
| |
| onLiteral | back to summary |
|---|---|
| public void onLiteral(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal Header Field without Indexing decoded,
where both a
The default implementation invokes
| |
| onLiteralNeverIndexed | back to summary |
|---|---|
| public void onLiteralNeverIndexed(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal Header Field Never Indexed decoded, where a
The default implementation invokes
| |
| onLiteralNeverIndexed | back to summary |
|---|---|
| public void onLiteralNeverIndexed(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal Header Field Never Indexed decoded, where
both a
The default implementation invokes
| |
| onLiteralWithIndexing | back to summary |
|---|---|
| public void onLiteralWithIndexing(int index, CharSequence name, CharSequence value, boolean valueHuffman) A Literal Header Field with Incremental Indexing
decoded, where a
The default implementation invokes
| |
| onLiteralWithIndexing | back to summary |
|---|---|
| public void onLiteralWithIndexing(CharSequence name, boolean nameHuffman, CharSequence value, boolean valueHuffman) A Literal Header Field with Incremental Indexing
decoded, where both a
The default implementation invokes
| |
| onSizeUpdate | back to summary |
|---|---|
| public void onSizeUpdate(int capacity) A Dynamic Table Size Update decoded. The default implementation does nothing.
| |