Http2Headers which only supports read-only methods.
Any array passed to this class may be used directly in the underlying data structures of this class. If these arrays may be modified it is the caller's responsibility to supply this class with a copy of the array.
This may be a good alternative to DefaultHttp2Headers if your have a fixed set of headers which will not
change.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final AsciiString[] | |
| private static final byte | |
| private final AsciiString[] |
| Access | Constructor and Description |
|---|---|
| private | ReadOnlyHttp2Headers(boolean validateHeaders, AsciiString[] pseudoHeaders, AsciiString... otherHeaders)
|
| Modifier and Type | Method and Description |
|---|---|
| public Http2Headers | add(CharSequence
the name of the header name, CharSequence the value of the header value)Implements io. name and value.
|
| public Http2Headers | add(CharSequence
the header name name, Iterable<? extends CharSequence> the values of the header values)Implements io. name and values.
|
| public Http2Headers | add(CharSequence
the header name name, CharSequence... the values of the header values)Implements io. name and values.
|
| public Http2Headers | add(Headers<? extends CharSequence, ? extends CharSequence, ?> headers)
Implements io. headers to this object.
|
| public Http2Headers | addBoolean(CharSequence
the header name name, boolean the value of the header value)Implements io. |
| public Http2Headers | addByte(CharSequence
the header name name, byte the value of the header value)Implements io. |
| public Http2Headers | addChar(CharSequence
the header name name, char the value of the header value)Implements io. |
| public Http2Headers | addDouble(CharSequence
the header name name, double the value of the header value)Implements io. |
| public Http2Headers | addFloat(CharSequence
the header name name, float the value of the header value)Implements io. |
| public Http2Headers | addInt(CharSequence
the header name name, int the value of the header value)Implements io. |
| public Http2Headers | addLong(CharSequence
the header name name, long the value of the header value)Implements io. |
| public Http2Headers | addObject(CharSequence
the header name name, Object the value of the header value)Implements io. |
| public Http2Headers | addObject(CharSequence
the header name name, Iterable<?> the value of the header values)Implements io. |
| public Http2Headers | addObject(CharSequence
the header name name, Object... the value of the header values)Implements io. |
| public Http2Headers | addShort(CharSequence
the header name name, short the value of the header value)Implements io. |
| public Http2Headers | addTimeMillis(CharSequence
the header name name, long the value of the header value)Implements io. |
| public Http2Headers | authority(CharSequence value)
Implements io. PseudoHeaderName#AUTHORITY header
|
| public CharSequence | authority()
Implements io. PseudoHeaderName#AUTHORITY header or null if there is no such header
|
| public Http2Headers | |
| public static ReadOnlyHttp2Headers | Returns: a new read only representation of headers used by clients.true will run validation on each header name/value pair to ensure protocol
compliance.The value for method, AsciiString PseudoHeaderName#METHOD.The value for path, AsciiString PseudoHeaderName#PATH.The value for scheme, AsciiString PseudoHeaderName#SCHEME.The value for authority, AsciiString... PseudoHeaderName#AUTHORITY.An array of key:value pairs. Must not contain any
pseudo headers
or otherHeaders)null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.Create a new read only representation of headers used by clients. |
| public boolean | contains(CharSequence
the header name name)Implements io. true if a header with the name exists, false otherwise.
|
| public boolean | contains(CharSequence
the header name name, CharSequence the header value of the header to find value)Implements io. true if a header with the name and value exists, false otherwise.
|
| public boolean | contains(CharSequence
the name of the header to find name, CharSequence the value of the header to find value, boolean true then a case insensitive compare is run to compare values.
otherwise a case sensitive compare is run to compare values.Implements io. true if a header with the name and value exists, false otherwise.
|
| private static boolean | contains(CharSequence name, int nameHash, CharSequence value, int valueHash, HashingStrategy<CharSequence> hashingStrategy, AsciiString[] headers)
|
| public boolean | containsBoolean(CharSequence
the header name name, boolean the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsByte(CharSequence
the header name name, byte the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsChar(CharSequence
the header name name, char the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsDouble(CharSequence
the header name name, double the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsFloat(CharSequence
the header name name, float the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsInt(CharSequence
the header name name, int the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsLong(CharSequence
the header name name, long the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsObject(CharSequence
the header name name, Object the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsShort(CharSequence
the header name name, short the header value value)Implements io. true if a header with the name and value exists.
|
| public boolean | containsTimeMillis(CharSequence
the header name name, long the header value value)Implements io. true if a header with the name and value exists.
|
| public CharSequence | get(CharSequence
the name of the header to retrieve name)Implements io. |
| public CharSequence | get(CharSequence
the name of the header to retrieve name, CharSequence the default value defaultValue)Implements io. |
| private AsciiString | |
| public List | getAll(CharSequence
the name of the header to retrieve name)Implements io. |
| public List | getAllAndRemove(CharSequence
the name of the header to retrieve name)Implements io. |
| public CharSequence | getAndRemove(CharSequence
the name of the header to retrieve name)Implements io. |
| public CharSequence | getAndRemove(CharSequence
the name of the header to retrieve name, CharSequence the default value defaultValue)Implements io. |
| public Boolean | getBoolean(CharSequence
the name of the header to retrieve name)Implements io. boolean value of a header with the specified name.
|
| public boolean | getBoolean(CharSequence
the name of the header to retrieve name, boolean the default value defaultValue)Implements io. boolean value of a header with the specified name.
|
| public Boolean | getBooleanAndRemove(CharSequence
the name of the header to retrieve name)Implements io. boolean value of a header with the specified name and removes the header from this
object.
|
| public boolean | getBooleanAndRemove(CharSequence
the name of the header to search name, boolean the default value defaultValue)Implements io. boolean value of a header with the specified name and removes the header from this
object.
|
| public Byte | getByte(CharSequence
the name of the header to retrieve name)Implements io. byte value of a header with the specified name.
|
| public byte | getByte(CharSequence
the name of the header to retrieve name, byte the default value defaultValue)Implements io. byte value of a header with the specified name.
|
| public Byte | getByteAndRemove(CharSequence
the name of the header to search name)Implements io. byte value of a header with the specified name and removes the header from this
object.
|
| public byte | getByteAndRemove(CharSequence
the name of the header to search name, byte the default value defaultValue)Implements io. byte value of a header with the specified name and removes the header from this
object.
|
| public Character | getChar(CharSequence
the name of the header to retrieve name)Implements io. char value of a header with the specified name.
|
| public char | getChar(CharSequence
the name of the header to retrieve name, char the default value defaultValue)Implements io. char value of a header with the specified name.
|
| public Character | getCharAndRemove(CharSequence
the name of the header to search name)Implements io. char value of a header with the specified name and removes the header from this
object.
|
| public char | getCharAndRemove(CharSequence
the name of the header to search name, char the default value defaultValue)Implements io. char value of a header with the specified name and removes the header from this
object.
|
| public Double | getDouble(CharSequence
the name of the header to retrieve name)Implements io. double value of a header with the specified name.
|
| public double | getDouble(CharSequence
the name of the header to retrieve name, double the default value defaultValue)Implements io. double value of a header with the specified name.
|
| public Double | getDoubleAndRemove(CharSequence
the name of the header to search name)Implements io. double value of a header with the specified name and removes the header from this
object.
|
| public double | getDoubleAndRemove(CharSequence
the name of the header to search name, double the default value defaultValue)Implements io. double value of a header with the specified name and removes the header from this
object.
|
| public Float | getFloat(CharSequence
the name of the header to retrieve name)Implements io. float value of a header with the specified name.
|
| public float | getFloat(CharSequence
the name of the header to retrieve name, float the default value defaultValue)Implements io. float value of a header with the specified name.
|
| public Float | getFloatAndRemove(CharSequence
the name of the header to search name)Implements io. float value of a header with the specified name and removes the header from this
object.
|
| public float | getFloatAndRemove(CharSequence
the name of the header to search name, float the default value defaultValue)Implements io. float value of a header with the specified name and removes the header from this
object.
|
| public Integer | getInt(CharSequence
the name of the header to retrieve name)Implements io. int value of a header with the specified name.
|
| public int | getInt(CharSequence
the name of the header to retrieve name, int the default value defaultValue)Implements io. int value of a header with the specified name.
|
| public Integer | getIntAndRemove(CharSequence
the name of the header to search name)Implements io. int value of a header with the specified name and removes the header from this
object.
|
| public int | getIntAndRemove(CharSequence
the name of the header to search name, int the default value defaultValue)Implements io. int value of a header with the specified name and removes the header from this
object.
|
| public Long | getLong(CharSequence
the name of the header to retrieve name)Implements io. long value of a header with the specified name.
|
| public long | getLong(CharSequence
the name of the header to retrieve name, long the default value defaultValue)Implements io. long value of a header with the specified name.
|
| public Long | getLongAndRemove(CharSequence
the name of the header to search name)Implements io. long value of a header with the specified name and removes the header from this
object.
|
| public long | getLongAndRemove(CharSequence
the name of the header to search name, long the default value defaultValue)Implements io. long value of a header with the specified name and removes the header from this
object.
|
| public Short | getShort(CharSequence
the name of the header to retrieve name)Implements io. short value of a header with the specified name.
|
| public short | getShort(CharSequence
the name of the header to retrieve name, short the default value defaultValue)Implements io. short value of a header with the specified name.
|
| public Short | getShortAndRemove(CharSequence
the name of the header to search name)Implements io. short value of a header with the specified name and removes the header from this
object.
|
| public short | getShortAndRemove(CharSequence
the name of the header to search name, short the default value defaultValue)Implements io. short value of a header with the specified name and removes the header from this
object.
|
| public Long | getTimeMillis(CharSequence
the name of the header to retrieve name)Implements io. |
| public long | getTimeMillis(CharSequence
the name of the header to retrieve name, long the default value defaultValue)Implements io. |
| public Long | getTimeMillisAndRemove(CharSequence
the name of the header to retrieve name)Implements io. name in milliseconds and removes the header from this
object.
|
| public long | getTimeMillisAndRemove(CharSequence
the name of the header to retrieve name, long the default value defaultValue)Implements io. name in milliseconds and removes the header from this
object.
|
| public boolean | |
| public Iterator | iterator()
Implements io. |
| public Http2Headers | method(CharSequence value)
Implements io. PseudoHeaderName#METHOD header
|
| public CharSequence | method()
Implements io. PseudoHeaderName#METHOD header or null if there is no such header
|
| public Set | names()
Implements io. Set of all header names in this object.
|
| private static IllegalArgumentException | |
| public Http2Headers | path(CharSequence value)
Implements io. PseudoHeaderName#PATH header
|
| public CharSequence | path()
Implements io. PseudoHeaderName#PATH header or null if there is no such header
|
| public boolean | remove(CharSequence
the header name name)Implements io. name.
|
| public Http2Headers | scheme(CharSequence value)
Implements io. PseudoHeaderName#SCHEME header
|
| public CharSequence | scheme()
Implements io. PseudoHeaderName#SCHEME header or null if there is no such header
|
| public static ReadOnlyHttp2Headers | Returns: a new read only representation of headers used by servers.true will run validation on each header name/value pair to ensure protocol
compliance.The value for status, AsciiString... PseudoHeaderName#STATUS.An array of key:value pairs. Must not contain any
pseudo headers
or otherHeaders)null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.Create a new read only representation of headers used by servers. |
| public Http2Headers | set(CharSequence
the header name name, CharSequence the value of the header value)Implements io. |
| public Http2Headers | set(CharSequence
the header name name, Iterable<? extends CharSequence> the value of the header values)Implements io. |
| public Http2Headers | set(CharSequence
the header name name, CharSequence... the value of the header values)Implements io. |
| public Http2Headers | set(Headers<? extends CharSequence, ? extends CharSequence, ?> headers)
Implements io. headers.
|
| public Http2Headers | setAll(Headers<? extends CharSequence, ? extends CharSequence, ?>
The headers used to headers)set(K, V) values in this instanceImplements io. set(K, V) for each entry in headers.
|
| public Http2Headers | setBoolean(CharSequence
The name to modify name, boolean The value value)Implements io. name to value.
|
| public Http2Headers | setByte(CharSequence
The name to modify name, byte The value value)Implements io. name to value.
|
| public Http2Headers | setChar(CharSequence
The name to modify name, char The value value)Implements io. name to value.
|
| public Http2Headers | setDouble(CharSequence
The name to modify name, double The value value)Implements io. name to value.
|
| public Http2Headers | setFloat(CharSequence
The name to modify name, float The value value)Implements io. name to value.
|
| public Http2Headers | setInt(CharSequence
The name to modify name, int The value value)Implements io. name to value.
|
| public Http2Headers | setLong(CharSequence
The name to modify name, long The value value)Implements io. name to value.
|
| public Http2Headers | setObject(CharSequence
the header name name, Object the value of the header value)Implements io. |
| public Http2Headers | setObject(CharSequence
the header name name, Iterable<?> the values of the header values)Implements io. |
| public Http2Headers | setObject(CharSequence
the header name name, Object... the values of the header values)Implements io. |
| public Http2Headers | setShort(CharSequence
The name to modify name, short The value value)Implements io. name to value.
|
| public Http2Headers | setTimeMillis(CharSequence
The name to modify name, long The value value)Implements io. name to value.
|
| public int | |
| public Http2Headers | status(CharSequence value)
Implements io. PseudoHeaderName#STATUS header
|
| public CharSequence | status()
Implements io. PseudoHeaderName#STATUS header or null if there is no such header
|
| public String | |
| public static ReadOnlyHttp2Headers | Returns: A read only representation of the headers.true will run validation on each header name/value pair to ensure protocol
compliance.An array of key:value pairs. Must not contain any
pseudo headers
or otherHeaders)null names/values.
A copy will NOT be made of this array. If the contents of this array
may be modified externally you are responsible for passing in a copy.Used to create read only object designed to represent trailers. |
| private static void | |
| public Iterator | valueIterator(CharSequence
the name of the header to retrieve name)Implements io. getAll(Object) but no intermediate list is generated.
|