Class ReadOnlyHttp2Headers
- All Implemented Interfaces:
Headers<CharSequence,
,CharSequence, Http2Headers> Http2Headers
,Iterable<Map.Entry<CharSequence,
CharSequence>>
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
private final class
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2Headers
Http2Headers.PseudoHeaderName
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AsciiString[]
private static final byte
private final AsciiString[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ReadOnlyHttp2Headers
(boolean validateHeaders, AsciiString[] pseudoHeaders, AsciiString... otherHeaders) -
Method Summary
Modifier and TypeMethodDescriptionadd
(Headers<? extends CharSequence, ? extends CharSequence, ?> headers) Adds all header names and values ofheaders
to this object.add
(CharSequence name, CharSequence value) Adds a new header with the specifiedname
andvalue
.add
(CharSequence name, CharSequence... values) Adds new headers with the specifiedname
andvalues
.add
(CharSequence name, Iterable<? extends CharSequence> values) Adds new headers with the specifiedname
andvalues
.addBoolean
(CharSequence name, boolean value) Adds a new header.addByte
(CharSequence name, byte value) Adds a new header.addChar
(CharSequence name, char value) Adds a new header.addDouble
(CharSequence name, double value) Adds a new header.addFloat
(CharSequence name, float value) Adds a new header.addInt
(CharSequence name, int value) Adds a new header.addLong
(CharSequence name, long value) Adds a new header.addObject
(CharSequence name, Iterable<?> values) Adds a new header with the specified name and values.addObject
(CharSequence name, Object value) Adds a new header.addObject
(CharSequence name, Object... values) Adds a new header with the specified name and values.addShort
(CharSequence name, short value) Adds a new header.addTimeMillis
(CharSequence name, long value) Adds a new header.Gets theHttp2Headers.PseudoHeaderName.AUTHORITY
header ornull
if there is no such headerauthority
(CharSequence value) Sets theHttp2Headers.PseudoHeaderName.AUTHORITY
headerclear()
Removes all headers.static ReadOnlyHttp2Headers
clientHeaders
(boolean validateHeaders, AsciiString method, AsciiString path, AsciiString scheme, AsciiString authority, AsciiString... otherHeaders) Create a new read only representation of headers used by clients.boolean
contains
(CharSequence name) Returnstrue
if a header with thename
exists,false
otherwise.private static boolean
contains
(CharSequence name, int nameHash, CharSequence value, int valueHash, HashingStrategy<CharSequence> hashingStrategy, AsciiString[] headers) boolean
contains
(CharSequence name, CharSequence value) Returnstrue
if a header with thename
andvalue
exists,false
otherwise.boolean
contains
(CharSequence name, CharSequence value, boolean caseInsensitive) Returnstrue
if a header with thename
andvalue
exists,false
otherwise.boolean
containsBoolean
(CharSequence name, boolean value) Returnstrue
if a header with the name and value exists.boolean
containsByte
(CharSequence name, byte value) Returnstrue
if a header with the name and value exists.boolean
containsChar
(CharSequence name, char value) Returnstrue
if a header with the name and value exists.boolean
containsDouble
(CharSequence name, double value) Returnstrue
if a header with the name and value exists.boolean
containsFloat
(CharSequence name, float value) Returnstrue
if a header with the name and value exists.boolean
containsInt
(CharSequence name, int value) Returnstrue
if a header with the name and value exists.boolean
containsLong
(CharSequence name, long value) Returnstrue
if a header with the name and value exists.boolean
containsObject
(CharSequence name, Object value) Returnstrue
if a header with the name and value exists.boolean
containsShort
(CharSequence name, short value) Returnstrue
if a header with the name and value exists.boolean
containsTimeMillis
(CharSequence name, long value) Returnstrue
if a header with the name and value exists.get
(CharSequence name) Returns the value of a header with the specified name.get
(CharSequence name, CharSequence defaultValue) Returns the value of a header with the specified name.private AsciiString
get0
(CharSequence name) getAll
(CharSequence name) Returns all values for the header with the specified name.getAllAndRemove
(CharSequence name) Returns all values for the header with the specified name and removes them from this object.getAndRemove
(CharSequence name) Returns the value of a header with the specified name and removes it from this object.getAndRemove
(CharSequence name, CharSequence defaultValue) Returns the value of a header with the specified name and removes it from this object.getBoolean
(CharSequence name) Returns theboolean
value of a header with the specified name.boolean
getBoolean
(CharSequence name, boolean defaultValue) Returns theboolean
value of a header with the specified name.Returns theboolean
value of a header with the specifiedname
and removes the header from this object.boolean
getBooleanAndRemove
(CharSequence name, boolean defaultValue) Returns theboolean
value of a header with the specifiedname
and removes the header from this object.getByte
(CharSequence name) Returns thebyte
value of a header with the specified name.byte
getByte
(CharSequence name, byte defaultValue) Returns thebyte
value of a header with the specified name.getByteAndRemove
(CharSequence name) Returns thebyte
value of a header with the specifiedname
and removes the header from this object.byte
getByteAndRemove
(CharSequence name, byte defaultValue) Returns thebyte
value of a header with the specifiedname
and removes the header from this object.getChar
(CharSequence name) Returns thechar
value of a header with the specified name.char
getChar
(CharSequence name, char defaultValue) Returns thechar
value of a header with the specified name.getCharAndRemove
(CharSequence name) Returns thechar
value of a header with the specifiedname
and removes the header from this object.char
getCharAndRemove
(CharSequence name, char defaultValue) Returns thechar
value of a header with the specifiedname
and removes the header from this object.getDouble
(CharSequence name) Returns thedouble
value of a header with the specified name.double
getDouble
(CharSequence name, double defaultValue) Returns thedouble
value of a header with the specified name.Returns thedouble
value of a header with the specifiedname
and removes the header from this object.double
getDoubleAndRemove
(CharSequence name, double defaultValue) Returns thedouble
value of a header with the specifiedname
and removes the header from this object.getFloat
(CharSequence name) Returns thefloat
value of a header with the specified name.float
getFloat
(CharSequence name, float defaultValue) Returns thefloat
value of a header with the specified name.Returns thefloat
value of a header with the specifiedname
and removes the header from this object.float
getFloatAndRemove
(CharSequence name, float defaultValue) Returns thefloat
value of a header with the specifiedname
and removes the header from this object.getInt
(CharSequence name) Returns theint
value of a header with the specified name.int
getInt
(CharSequence name, int defaultValue) Returns theint
value of a header with the specified name.getIntAndRemove
(CharSequence name) Returns theint
value of a header with the specifiedname
and removes the header from this object.int
getIntAndRemove
(CharSequence name, int defaultValue) Returns theint
value of a header with the specifiedname
and removes the header from this object.getLong
(CharSequence name) Returns thelong
value of a header with the specified name.long
getLong
(CharSequence name, long defaultValue) Returns thelong
value of a header with the specified name.getLongAndRemove
(CharSequence name) Returns thelong
value of a header with the specifiedname
and removes the header from this object.long
getLongAndRemove
(CharSequence name, long defaultValue) Returns thelong
value of a header with the specifiedname
and removes the header from this object.getShort
(CharSequence name) Returns theshort
value of a header with the specified name.short
getShort
(CharSequence name, short defaultValue) Returns theshort
value of a header with the specified name.Returns theshort
value of a header with the specifiedname
and removes the header from this object.short
getShortAndRemove
(CharSequence name, short defaultValue) Returns theshort
value of a header with the specifiedname
and removes the header from this object.getTimeMillis
(CharSequence name) Returns the value of a header with the specified name in milliseconds.long
getTimeMillis
(CharSequence name, long defaultValue) Returns the value of a header with the specified name in milliseconds.Returns the value of a header with the specifiedname
in milliseconds and removes the header from this object.long
getTimeMillisAndRemove
(CharSequence name, long defaultValue) Returns the value of a header with the specifiedname
in milliseconds and removes the header from this object.boolean
isEmpty()
iterator()
Returns an iterator over all HTTP/2 headers.method()
Gets theHttp2Headers.PseudoHeaderName.METHOD
header ornull
if there is no such headermethod
(CharSequence value) Sets theHttp2Headers.PseudoHeaderName.METHOD
headernames()
Returns aSet
of all header names in this object.private static IllegalArgumentException
path()
Gets theHttp2Headers.PseudoHeaderName.PATH
header ornull
if there is no such headerpath
(CharSequence value) Sets theHttp2Headers.PseudoHeaderName.PATH
headerboolean
remove
(CharSequence name) Removes all headers with the specifiedname
.scheme()
Gets theHttp2Headers.PseudoHeaderName.SCHEME
header ornull
if there is no such headerscheme
(CharSequence value) Sets theHttp2Headers.PseudoHeaderName.SCHEME
headerstatic ReadOnlyHttp2Headers
serverHeaders
(boolean validateHeaders, AsciiString status, AsciiString... otherHeaders) Create a new read only representation of headers used by servers.set
(Headers<? extends CharSequence, ? extends CharSequence, ?> headers) Clears the current header entries and copies all header entries of the specifiedheaders
.set
(CharSequence name, CharSequence value) Sets a header with the specified name and value.set
(CharSequence name, CharSequence... values) Sets a header with the specified name and values.set
(CharSequence name, Iterable<? extends CharSequence> values) Sets a new header with the specified name and values.setAll
(Headers<? extends CharSequence, ? extends CharSequence, ?> headers) Retains all current headers but callsHeaders.set(K, V)
for each entry inheaders
.setBoolean
(CharSequence name, boolean value) Set thename
tovalue
.setByte
(CharSequence name, byte value) Set thename
tovalue
.setChar
(CharSequence name, char value) Set thename
tovalue
.setDouble
(CharSequence name, double value) Set thename
tovalue
.setFloat
(CharSequence name, float value) Set thename
tovalue
.setInt
(CharSequence name, int value) Set thename
tovalue
.setLong
(CharSequence name, long value) Set thename
tovalue
.setObject
(CharSequence name, Iterable<?> values) Sets a header with the specified name and values.setObject
(CharSequence name, Object value) Sets a new header.setObject
(CharSequence name, Object... values) Sets a header with the specified name and values.setShort
(CharSequence name, short value) Set thename
tovalue
.setTimeMillis
(CharSequence name, long value) Set thename
tovalue
.int
size()
Returns the number of headers in this object.status()
Gets theHttp2Headers.PseudoHeaderName.STATUS
header ornull
if there is no such headerstatus
(CharSequence value) Sets theHttp2Headers.PseudoHeaderName.STATUS
headertoString()
static ReadOnlyHttp2Headers
trailers
(boolean validateHeaders, AsciiString... otherHeaders) Used to create read only object designed to represent trailers.private static void
validateHeaders
(AsciiString[] pseudoHeaders, AsciiString... otherHeaders) valueIterator
(CharSequence name) Equivalent toHeaders.getAll(Object)
but no intermediate list is generated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
PSEUDO_HEADER_TOKEN
private static final byte PSEUDO_HEADER_TOKEN- See Also:
-
pseudoHeaders
-
otherHeaders
-
-
Constructor Details
-
ReadOnlyHttp2Headers
private ReadOnlyHttp2Headers(boolean validateHeaders, AsciiString[] pseudoHeaders, AsciiString... otherHeaders)
-
-
Method Details
-
trailers
Used to create read only object designed to represent trailers.If this is used for a purpose other than trailers you may violate the header serialization ordering defined by RFC 7540, 8.1.2.1.
- Parameters:
validateHeaders
-true
will run validation on each header name/value pair to ensure protocol compliance.otherHeaders
- An array of key:value pairs. Must not contain any pseudo headers ornull
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.- Returns:
- A read only representation of the headers.
-
clientHeaders
public static ReadOnlyHttp2Headers clientHeaders(boolean validateHeaders, AsciiString method, AsciiString path, AsciiString scheme, AsciiString authority, AsciiString... otherHeaders) Create a new read only representation of headers used by clients.- Parameters:
validateHeaders
-true
will run validation on each header name/value pair to ensure protocol compliance.method
- The value forHttp2Headers.PseudoHeaderName.METHOD
.path
- The value forHttp2Headers.PseudoHeaderName.PATH
.scheme
- The value forHttp2Headers.PseudoHeaderName.SCHEME
.authority
- The value forHttp2Headers.PseudoHeaderName.AUTHORITY
.otherHeaders
- An array of key:value pairs. Must not contain any pseudo headers ornull
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.- Returns:
- a new read only representation of headers used by clients.
-
serverHeaders
public static ReadOnlyHttp2Headers serverHeaders(boolean validateHeaders, AsciiString status, AsciiString... otherHeaders) Create a new read only representation of headers used by servers.- Parameters:
validateHeaders
-true
will run validation on each header name/value pair to ensure protocol compliance.status
- The value forHttp2Headers.PseudoHeaderName.STATUS
.otherHeaders
- An array of key:value pairs. Must not contain any pseudo headers ornull
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.- Returns:
- a new read only representation of headers used by servers.
-
newInvalidArraySizeException
-
validateHeaders
-
get0
-
get
Description copied from interface:Headers
Returns the value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
get
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the first header value if the header is found.
null
if there's no such header
-
get
Description copied from interface:Headers
Returns the value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
get
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the first header value or
defaultValue
if there is no such header
-
getAndRemove
Description copied from interface:Headers
Returns the value of a header with the specified name and removes it from this object. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the first header value or
null
if there is no such header
-
getAndRemove
Description copied from interface:Headers
Returns the value of a header with the specified name and removes it from this object. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the first header value or
defaultValue
if there is no such header
-
getAll
Description copied from interface:Headers
Returns all values for the header with the specified name. The returnedList
can't be modified.- Specified by:
getAll
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- a
List
of header values or an emptyList
if no values are found.
-
getAllAndRemove
Description copied from interface:Headers
Returns all values for the header with the specified name and removes them from this object. The returnedList
can't be modified.- Specified by:
getAllAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- a
List
of header values or an emptyList
if no values are found.
-
getBoolean
Description copied from interface:Headers
Returns theboolean
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getBoolean
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
boolean
value of the first value in insertion order ornull
if there is no such value or it can't be converted toboolean
.
-
getBoolean
Description copied from interface:Headers
Returns theboolean
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getBoolean
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
boolean
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toboolean
.
-
getByte
Description copied from interface:Headers
Returns thebyte
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getByte
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
byte
value of the first value in insertion order ornull
if there is no such value or it can't be converted tobyte
.
-
getByte
Description copied from interface:Headers
Returns thebyte
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getByte
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
byte
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tobyte
.
-
getChar
Description copied from interface:Headers
Returns thechar
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getChar
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
char
value of the first value in insertion order ornull
if there is no such value or it can't be converted tochar
.
-
getChar
Description copied from interface:Headers
Returns thechar
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getChar
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
char
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tochar
.
-
getShort
Description copied from interface:Headers
Returns theshort
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getShort
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
short
value of the first value in insertion order ornull
if there is no such value or it can't be converted toshort
.
-
getShort
Description copied from interface:Headers
Returns theshort
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getShort
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
short
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toshort
.
-
getInt
Description copied from interface:Headers
Returns theint
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getInt
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
int
value of the first value in insertion order ornull
if there is no such value or it can't be converted toint
.
-
getInt
Description copied from interface:Headers
Returns theint
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getInt
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
int
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toint
.
-
getLong
Description copied from interface:Headers
Returns thelong
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getLong
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
long
value of the first value in insertion order ornull
if there is no such value or it can't be converted tolong
.
-
getLong
Description copied from interface:Headers
Returns thelong
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getLong
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
long
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tolong
.
-
getFloat
Description copied from interface:Headers
Returns thefloat
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getFloat
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
float
value of the first value in insertion order ornull
if there is no such value or it can't be converted tofloat
.
-
getFloat
Description copied from interface:Headers
Returns thefloat
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getFloat
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
float
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tofloat
.
-
getDouble
Description copied from interface:Headers
Returns thedouble
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getDouble
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
double
value of the first value in insertion order ornull
if there is no such value or it can't be converted todouble
.
-
getDouble
Description copied from interface:Headers
Returns thedouble
value of a header with the specified name. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getDouble
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the
double
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted todouble
.
-
getTimeMillis
Description copied from interface:Headers
Returns the value of a header with the specified name in milliseconds. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getTimeMillis
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the milliseconds value of the first value in insertion order or
null
if there is no such value or it can't be converted to milliseconds.
-
getTimeMillis
Description copied from interface:Headers
Returns the value of a header with the specified name in milliseconds. If there is more than one value for the specified name, the first value in insertion order is returned.- Specified by:
getTimeMillis
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue
if there is no such value or it can't be converted to milliseconds.
-
getBooleanAndRemove
Description copied from interface:Headers
Returns theboolean
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getBooleanAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the
boolean
value of the first value in insertion order ornull
if there is no such value or it can't be converted toboolean
.
-
getBooleanAndRemove
Description copied from interface:Headers
Returns theboolean
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getBooleanAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
boolean
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toboolean
.
-
getByteAndRemove
Description copied from interface:Headers
Returns thebyte
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getByteAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
byte
value of the first value in insertion order ornull
if there is no such value or it can't be converted tobyte
.
-
getByteAndRemove
Description copied from interface:Headers
Returns thebyte
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getByteAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
byte
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tobyte
.
-
getCharAndRemove
Description copied from interface:Headers
Returns thechar
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getCharAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
char
value of the first value in insertion order ornull
if there is no such value or it can't be converted tochar
.
-
getCharAndRemove
Description copied from interface:Headers
Returns thechar
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getCharAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
char
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tochar
.
-
getShortAndRemove
Description copied from interface:Headers
Returns theshort
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getShortAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
short
value of the first value in insertion order ornull
if there is no such value or it can't be converted toshort
.
-
getShortAndRemove
Description copied from interface:Headers
Returns theshort
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getShortAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
short
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toshort
.
-
getIntAndRemove
Description copied from interface:Headers
Returns theint
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getIntAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
int
value of the first value in insertion order ornull
if there is no such value or it can't be converted toint
.
-
getIntAndRemove
Description copied from interface:Headers
Returns theint
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getIntAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
int
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted toint
.
-
getLongAndRemove
Description copied from interface:Headers
Returns thelong
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getLongAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
long
value of the first value in insertion order ornull
if there is no such value or it can't be converted tolong
.
-
getLongAndRemove
Description copied from interface:Headers
Returns thelong
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getLongAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
long
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tolong
.
-
getFloatAndRemove
Description copied from interface:Headers
Returns thefloat
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getFloatAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
float
value of the first value in insertion order ornull
if there is no such value or it can't be converted tofloat
.
-
getFloatAndRemove
Description copied from interface:Headers
Returns thefloat
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getFloatAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
float
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted tofloat
.
-
getDoubleAndRemove
Description copied from interface:Headers
Returns thedouble
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getDoubleAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to search- Returns:
- the
double
value of the first value in insertion order ornull
if there is no such value or it can't be converted todouble
.
-
getDoubleAndRemove
Description copied from interface:Headers
Returns thedouble
value of a header with the specifiedname
and removes the header from this object. If there is more than one value for the specified name, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getDoubleAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to searchdefaultValue
- the default value- Returns:
- the
double
value of the first value in insertion order ordefaultValue
if there is no such value or it can't be converted todouble
.
-
getTimeMillisAndRemove
Description copied from interface:Headers
Returns the value of a header with the specifiedname
in milliseconds and removes the header from this object. If there is more than one value for the specifiedname
, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getTimeMillisAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrieve- Returns:
- the milliseconds value of the first value in insertion order or
null
if there is no such value or it can't be converted to milliseconds.
-
getTimeMillisAndRemove
Description copied from interface:Headers
Returns the value of a header with the specifiedname
in milliseconds and removes the header from this object. If there is more than one value for the specifiedname
, the first value in insertion order is returned. In any case all values forname
are removed.If an exception occurs during the translation from type
T
all entries withname
may still be removed.- Specified by:
getTimeMillisAndRemove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the header to retrievedefaultValue
- the default value- Returns:
- the milliseconds value of the first value in insertion order or
defaultValue
if there is no such value or it can't be converted to milliseconds.
-
contains
Description copied from interface:Headers
Returnstrue
if a header with thename
exists,false
otherwise.- Specified by:
contains
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header name
-
contains
Description copied from interface:Headers
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.The
Object.equals(Object)
method is used to test for equality ofvalue
.- Specified by:
contains
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value of the header to find
-
containsObject
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsBoolean
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsBoolean
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsByte
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsByte
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsChar
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsChar
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsShort
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsShort
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsInt
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsInt
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsLong
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsLong
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsFloat
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsFloat
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsDouble
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsDouble
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
containsTimeMillis
Description copied from interface:Headers
Returnstrue
if a header with the name and value exists.- Specified by:
containsTimeMillis
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the header value- Returns:
true
if it contains itfalse
otherwise
-
size
public int size()Description copied from interface:Headers
Returns the number of headers in this object.- Specified by:
size
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers>
-
isEmpty
public boolean isEmpty()Description copied from interface:Headers
- Specified by:
isEmpty
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers>
-
names
Description copied from interface:Headers
- Specified by:
names
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers>
-
add
Description copied from interface:Headers
Adds a new header with the specifiedname
andvalue
.- Specified by:
add
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the name of the headervalue
- the value of the header- Returns:
this
-
add
Description copied from interface:Headers
Adds new headers with the specifiedname
andvalues
. This method is semantically equivalent tofor (T value : values) { headers.add(name, value); }
- Specified by:
add
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the values of the header- Returns:
this
-
add
Description copied from interface:Headers
Adds new headers with the specifiedname
andvalues
. This method is semantically equivalent tofor (T value : values) { headers.add(name, value); }
- Specified by:
add
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the values of the header- Returns:
this
-
addObject
Description copied from interface:Headers
Adds a new header. Before thevalue
is added, it's converted to typeT
.- Specified by:
addObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addObject
Description copied from interface:Headers
Adds a new header with the specified name and values. This method is equivalent tofor (Object v : values) { headers.addObject(name, v); }
- Specified by:
addObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the value of the header- Returns:
this
-
addObject
Description copied from interface:Headers
Adds a new header with the specified name and values. This method is equivalent tofor (Object v : values) { headers.addObject(name, v); }
- Specified by:
addObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the value of the header- Returns:
this
-
addBoolean
Description copied from interface:Headers
Adds a new header.- Specified by:
addBoolean
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addByte
Description copied from interface:Headers
Adds a new header.- Specified by:
addByte
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addChar
Description copied from interface:Headers
Adds a new header.- Specified by:
addChar
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addShort
Description copied from interface:Headers
Adds a new header.- Specified by:
addShort
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addInt
Description copied from interface:Headers
Adds a new header.- Specified by:
addInt
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addLong
Description copied from interface:Headers
Adds a new header.- Specified by:
addLong
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addFloat
Description copied from interface:Headers
Adds a new header.- Specified by:
addFloat
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addDouble
Description copied from interface:Headers
Adds a new header.- Specified by:
addDouble
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
addTimeMillis
Description copied from interface:Headers
Adds a new header.- Specified by:
addTimeMillis
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
add
Description copied from interface:Headers
Adds all header names and values ofheaders
to this object.- Specified by:
add
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Returns:
this
-
set
Description copied from interface:Headers
Sets a header with the specified name and value. Any existing headers with the same name are overwritten.- Specified by:
set
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
set
Description copied from interface:Headers
Sets a new header with the specified name and values. This method is equivalent tofor (T v : values) { headers.addObject(name, v); }
- Specified by:
set
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the value of the header- Returns:
this
-
set
Description copied from interface:Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:headers.remove(name); for (T v : values) { headers.add(name, v); }
- Specified by:
set
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the value of the header- Returns:
this
-
setObject
Description copied from interface:Headers
Sets a new header. Any existing headers with this name are removed. Before thevalue
is add, it's converted to typeT
.- Specified by:
setObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalue
- the value of the header- Returns:
this
-
setObject
Description copied from interface:Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:headers.remove(name); for (Object v : values) { headers.addObject(name, v); }
- Specified by:
setObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the values of the header- Returns:
this
-
setObject
Description copied from interface:Headers
Sets a header with the specified name and values. Any existing headers with this name are removed. This method is equivalent to:headers.remove(name); for (Object v : values) { headers.addObject(name, v); }
- Specified by:
setObject
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header namevalues
- the values of the header- Returns:
this
-
setBoolean
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setBoolean
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setByte
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setByte
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setChar
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setChar
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setShort
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setShort
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setInt
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setInt
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setLong
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setLong
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setFloat
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setFloat
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setDouble
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setDouble
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
setTimeMillis
Description copied from interface:Headers
Set thename
tovalue
. This will remove all previous values associated withname
.- Specified by:
setTimeMillis
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- The name to modifyvalue
- The value- Returns:
this
-
set
Description copied from interface:Headers
Clears the current header entries and copies all header entries of the specifiedheaders
.- Specified by:
set
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Returns:
this
-
setAll
Description copied from interface:Headers
Retains all current headers but callsHeaders.set(K, V)
for each entry inheaders
.- Specified by:
setAll
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
headers
- The headers used toHeaders.set(K, V)
values in this instance- Returns:
this
-
remove
Description copied from interface:Headers
Removes all headers with the specifiedname
.- Specified by:
remove
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Parameters:
name
- the header name- Returns:
true
if at least one entry has been removed.
-
clear
Description copied from interface:Headers
Removes all headers. After a call to this methodHeaders.size()
equals0
.- Specified by:
clear
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Returns:
this
-
iterator
Description copied from interface:Http2Headers
Returns an iterator over all HTTP/2 headers. The iteration order is as follows: 1. All pseudo headers (order not specified). 2. All non-pseudo headers (in insertion order).- Specified by:
iterator
in interfaceHeaders<CharSequence,
CharSequence, Http2Headers> - Specified by:
iterator
in interfaceHttp2Headers
- Specified by:
iterator
in interfaceIterable<Map.Entry<CharSequence,
CharSequence>>
-
valueIterator
Description copied from interface:Http2Headers
Equivalent toHeaders.getAll(Object)
but no intermediate list is generated.- Specified by:
valueIterator
in interfaceHttp2Headers
- Parameters:
name
- the name of the header to retrieve- Returns:
- an
Iterator
of header values corresponding toname
.
-
method
Description copied from interface:Http2Headers
Sets theHttp2Headers.PseudoHeaderName.METHOD
header- Specified by:
method
in interfaceHttp2Headers
-
scheme
Description copied from interface:Http2Headers
Sets theHttp2Headers.PseudoHeaderName.SCHEME
header- Specified by:
scheme
in interfaceHttp2Headers
-
authority
Description copied from interface:Http2Headers
Sets theHttp2Headers.PseudoHeaderName.AUTHORITY
header- Specified by:
authority
in interfaceHttp2Headers
-
path
Description copied from interface:Http2Headers
Sets theHttp2Headers.PseudoHeaderName.PATH
header- Specified by:
path
in interfaceHttp2Headers
-
status
Description copied from interface:Http2Headers
Sets theHttp2Headers.PseudoHeaderName.STATUS
header- Specified by:
status
in interfaceHttp2Headers
-
method
Description copied from interface:Http2Headers
Gets theHttp2Headers.PseudoHeaderName.METHOD
header ornull
if there is no such header- Specified by:
method
in interfaceHttp2Headers
-
scheme
Description copied from interface:Http2Headers
Gets theHttp2Headers.PseudoHeaderName.SCHEME
header ornull
if there is no such header- Specified by:
scheme
in interfaceHttp2Headers
-
authority
Description copied from interface:Http2Headers
Gets theHttp2Headers.PseudoHeaderName.AUTHORITY
header ornull
if there is no such header- Specified by:
authority
in interfaceHttp2Headers
-
path
Description copied from interface:Http2Headers
Gets theHttp2Headers.PseudoHeaderName.PATH
header ornull
if there is no such header- Specified by:
path
in interfaceHttp2Headers
-
status
Description copied from interface:Http2Headers
Gets theHttp2Headers.PseudoHeaderName.STATUS
header ornull
if there is no such header- Specified by:
status
in interfaceHttp2Headers
-
contains
Description copied from interface:Http2Headers
Returnstrue
if a header with thename
andvalue
exists,false
otherwise.If
caseInsensitive
istrue
then a case insensitive compare is done on the value.- Specified by:
contains
in interfaceHttp2Headers
- Parameters:
name
- the name of the header to findvalue
- the value of the header to findcaseInsensitive
-true
then a case insensitive compare is run to compare values. otherwise a case sensitive compare is run to compare values.
-
contains
private static boolean contains(CharSequence name, int nameHash, CharSequence value, int valueHash, HashingStrategy<CharSequence> hashingStrategy, AsciiString[] headers) -
toString
-