@UnstableApi public class DefaultHttp2Headers extends DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers> implements Http2Headers
DefaultHeaders.HeaderEntry<K,V>, DefaultHeaders.NameValidator<K>, DefaultHeaders.ValueValidator<V>Http2Headers.PseudoHeaderNamehead| 构造器和说明 |
|---|
DefaultHttp2Headers()
Create a new instance.
|
DefaultHttp2Headers(boolean validate)
Create a new instance.
|
DefaultHttp2Headers(boolean validate,
boolean validateValues,
int arraySizeHint)
Create a new instance.
|
DefaultHttp2Headers(boolean validate,
int arraySizeHint)
Create a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.CharSequence |
authority()
Gets the
Http2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such header |
Http2Headers |
authority(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.AUTHORITY header |
Http2Headers |
clear()
Removes all headers.
|
boolean |
contains(java.lang.CharSequence name,
java.lang.CharSequence value)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
contains(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitive)
Returns
true if a header with the name and value exists, false otherwise. |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.CharSequence |
method()
Gets the
Http2Headers.PseudoHeaderName.METHOD header or null if there is no such header |
Http2Headers |
method(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.METHOD header |
protected DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> |
newHeaderEntry(int h,
java.lang.CharSequence name,
java.lang.CharSequence value,
DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> next) |
java.lang.CharSequence |
path()
Gets the
Http2Headers.PseudoHeaderName.PATH header or null if there is no such header |
Http2Headers |
path(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.PATH header |
java.lang.CharSequence |
scheme()
Gets the
Http2Headers.PseudoHeaderName.SCHEME header or null if there is no such header |
Http2Headers |
scheme(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.SCHEME header |
java.lang.CharSequence |
status()
Gets the
Http2Headers.PseudoHeaderName.STATUS header or null if there is no such header |
Http2Headers |
status(java.lang.CharSequence value)
Sets the
Http2Headers.PseudoHeaderName.STATUS header |
protected void |
validateName(DefaultHeaders.NameValidator<java.lang.CharSequence> validator,
boolean forAdd,
java.lang.CharSequence name)
Call out to the given
DefaultHeaders.NameValidator to validate the given name. |
protected void |
validateValue(DefaultHeaders.ValueValidator<java.lang.CharSequence> validator,
java.lang.CharSequence name,
java.lang.CharSequence value) |
add, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addImpl, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, contains, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, copy, equals, get, get, getAll, getAllAndRemove, getAndRemove, getAndRemove, getBoolean, getBoolean, getBooleanAndRemove, getBooleanAndRemove, getByte, getByte, getByteAndRemove, getByteAndRemove, getChar, getChar, getCharAndRemove, getCharAndRemove, getDouble, getDouble, getDoubleAndRemove, getDoubleAndRemove, getFloat, getFloat, getFloatAndRemove, getFloatAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, hashCode, isEmpty, iterator, names, nameValidator, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, size, toString, valueConverter, valueIterator, valueValidatoriterator, valueIteratoradd, add, add, add, addBoolean, addByte, addChar, addDouble, addFloat, addInt, addLong, addObject, addObject, addObject, addShort, addTimeMillis, contains, containsBoolean, containsByte, containsChar, containsDouble, containsFloat, containsInt, containsLong, containsObject, containsShort, containsTimeMillis, get, get, getAll, getAllAndRemove, getAndRemove, getAndRemove, getBoolean, getBoolean, getBooleanAndRemove, getBooleanAndRemove, getByte, getByte, getByteAndRemove, getByteAndRemove, getChar, getChar, getCharAndRemove, getCharAndRemove, getDouble, getDouble, getDoubleAndRemove, getDoubleAndRemove, getFloat, getFloat, getFloatAndRemove, getFloatAndRemove, getInt, getInt, getIntAndRemove, getIntAndRemove, getLong, getLong, getLongAndRemove, getLongAndRemove, getShort, getShort, getShortAndRemove, getShortAndRemove, getTimeMillis, getTimeMillis, getTimeMillisAndRemove, getTimeMillisAndRemove, isEmpty, names, remove, set, set, set, set, setAll, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setObject, setObject, setShort, setTimeMillis, sizepublic DefaultHttp2Headers()
Header names will be validated according to rfc7540.
public DefaultHttp2Headers(boolean validate)
validate - true to validate header names according to
rfc7540. false to not validate header names.public DefaultHttp2Headers(boolean validate,
int arraySizeHint)
validate - true to validate header names according to
rfc7540. false to not validate header names.arraySizeHint - A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced.DefaultHttp2Headers(boolean, boolean, int)public DefaultHttp2Headers(boolean validate,
boolean validateValues,
int arraySizeHint)
validate - true to validate header names according to
rfc7540. false to not validate header names.validateValues - true to validate header values according to
rfc7230 and
rfc5234. Otherwise, false
(the default) to not validate values.arraySizeHint - A hint as to how large the hash data structure should be.
The next positive power of two will be used. An upper bound may be enforced.protected void validateName(DefaultHeaders.NameValidator<java.lang.CharSequence> validator, boolean forAdd, java.lang.CharSequence name)
DefaultHeadersDefaultHeaders.NameValidator to validate the given name.validateName 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>validator - the validator to useforAdd - true if this validation is for adding to the headers, or false if this is for
setting (overwriting) the given header.name - the name to validate.protected void validateValue(DefaultHeaders.ValueValidator<java.lang.CharSequence> validator, java.lang.CharSequence name, java.lang.CharSequence value)
validateValue 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public Http2Headers clear()
HeadersHeaders.size() equals 0.clear 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>clear 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>thispublic boolean equals(java.lang.Object o)
equals 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public int hashCode()
hashCode 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>public Http2Headers method(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.METHOD headermethod 在接口中 Http2Headerspublic Http2Headers scheme(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.SCHEME headerscheme 在接口中 Http2Headerspublic Http2Headers authority(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.AUTHORITY headerauthority 在接口中 Http2Headerspublic Http2Headers path(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.PATH headerpath 在接口中 Http2Headerspublic Http2Headers status(java.lang.CharSequence value)
Http2HeadersHttp2Headers.PseudoHeaderName.STATUS headerstatus 在接口中 Http2Headerspublic java.lang.CharSequence method()
Http2HeadersHttp2Headers.PseudoHeaderName.METHOD header or null if there is no such headermethod 在接口中 Http2Headerspublic java.lang.CharSequence scheme()
Http2HeadersHttp2Headers.PseudoHeaderName.SCHEME header or null if there is no such headerscheme 在接口中 Http2Headerspublic java.lang.CharSequence authority()
Http2HeadersHttp2Headers.PseudoHeaderName.AUTHORITY header or null if there is no such headerauthority 在接口中 Http2Headerspublic java.lang.CharSequence path()
Http2HeadersHttp2Headers.PseudoHeaderName.PATH header or null if there is no such headerpath 在接口中 Http2Headerspublic java.lang.CharSequence status()
Http2HeadersHttp2Headers.PseudoHeaderName.STATUS header or null if there is no such headerstatus 在接口中 Http2Headerspublic boolean contains(java.lang.CharSequence name,
java.lang.CharSequence value)
Headerstrue if a header with the name and value exists, false otherwise.
The Object.equals(Object) method is used to test for equality of value.
contains 在接口中 Headers<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>contains 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>name - the header namevalue - the header value of the header to findpublic boolean contains(java.lang.CharSequence name,
java.lang.CharSequence value,
boolean caseInsensitive)
Http2Headerstrue if a header with the name and value exists, false otherwise.
If caseInsensitive is true then a case insensitive compare is done on the value.
contains 在接口中 Http2Headersname - 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.protected final DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> newHeaderEntry(int h, java.lang.CharSequence name, java.lang.CharSequence value, DefaultHeaders.HeaderEntry<java.lang.CharSequence,java.lang.CharSequence> next)
newHeaderEntry 在类中 DefaultHeaders<java.lang.CharSequence,java.lang.CharSequence,Http2Headers>