Http2Headers.
API Note
It is an implementation detail that this class extends MultiMap. The multi-map itself is not part
of the public API for this class. Only the methods declared in HttpHeaders are considered public API.
| Modifier and Type | Field and Description |
|---|---|
| private static final ByteProcessor |
| Access | Constructor and Description |
|---|---|
| public | DefaultHttp2Headers(int
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. arraySizeHint, boolean true to validate header names.true to validate cookie contents when parsing.true to validate header values.Create a new instance. |
| HTTP2_NAME_VALIDATOR_PROCESSOR | back to summary |
|---|---|
| private static final ByteProcessor HTTP2_NAME_VALIDATOR_PROCESSOR | |
| DefaultHttp2Headers | back to summary |
|---|---|
| public DefaultHttp2Headers(int arraySizeHint, boolean validateNames, boolean validateCookies, boolean validateValues) Create a new instance.
| |
| add | back to summary |
|---|---|
| public Http2Headers add(CharSequence name, CharSequence value) Overrides io. Implements io. Doc from io. Adds a new header with the specified
| |
| add | back to summary |
|---|---|
| public Http2Headers add(CharSequence name, Iterable<? extends CharSequence> values) Overrides io. Implements io. Doc from io. Adds new headers with the specified
for (T value : values) {
headers.add(name, value);
}
| |
| add | back to summary |
|---|---|
| public Http2Headers add(CharSequence name, Iterator<? extends CharSequence> valuesItr) Overrides default io. Doc from io. Adds new headers with the specified
while (valueItr.hasNext()) {
headers.add(name, valueItr.next());
}
| |
| add | back to summary |
|---|---|
| public Http2Headers add(CharSequence name, CharSequence... values) Overrides io. Implements io. Doc from io. Adds new headers with the specified
for (T value : values) {
headers.add(name, value);
}
| |
| add | back to summary |
|---|---|
| public Http2Headers add(HttpHeaders headers) Overrides io. Implements io. Doc from io. Adds all header names and values of
| |
| addCookie | back to summary |
|---|---|
| public Http2Headers addCookie(HttpCookiePair cookie) Overrides io. Implements io. Doc from io. Adds a cookie.
This may result in multiple
| |
| addCookie | back to summary |
|---|---|
| public Http2Headers addCookie(final CharSequence name, final CharSequence value) Overrides default io. Doc from io. Adds a cookie with the specified
This may result in multiple
| |
| addSetCookie | back to summary |
|---|---|
| public Http2Headers addSetCookie(HttpSetCookie cookie) Overrides io. Implements io. Doc from io. Adds a set-cookie.
This may result in multiple
| |
| addSetCookie | back to summary |
|---|---|
| public Http2Headers addSetCookie(final CharSequence name, final CharSequence value) Overrides default io. Doc from io. Adds a set-cookie with the specified
This may result in multiple
| |
| authority | back to summary |
|---|---|
| public Http2Headers authority(CharSequence value) Implements io. Doc from io. Sets the
| |
| authority | back to summary |
|---|---|
| public CharSequence authority() Implements io. Doc from io. Gets the
| |
| clear | back to summary |
|---|---|
| public Http2Headers clear() Overrides io. Implements io. Doc from io. Removes all headers.
| |
| concat | back to summary |
|---|---|
| private static <T> Iterator | |
| copy | back to summary |
|---|---|
| public Http2Headers copy() Overrides io. Implements io. Doc from io. Create an independent copy of these HTTP headers.
| |
| filter | back to summary |
|---|---|
| private static <T> Iterator | |
| iterator | back to summary |
|---|---|
| public Iterator Overrides io. Implements io. Doc from java. Returns an iterator over elements of type
| |
| method | back to summary |
|---|---|
| public Http2Headers method(CharSequence value) Implements io. Doc from io. Sets the
| |
| method | back to summary |
|---|---|
| public CharSequence method() Implements io. Doc from io. Gets the
| |
| path | back to summary |
|---|---|
| public Http2Headers path(CharSequence value) Implements io. Doc from io. Sets the
| |
| path | back to summary |
|---|---|
| public CharSequence path() Implements io. Doc from io. Gets the
| |
| replace | back to summary |
|---|---|
| public Http2Headers replace(final HttpHeaders headers) Overrides default io. Doc from io. Removes all header names contained in
| |
| scheme | back to summary |
|---|---|
| public Http2Headers scheme(CharSequence value) Implements io. Doc from io. Sets the
| |
| scheme | back to summary |
|---|---|
| public CharSequence scheme() Implements io. Doc from io. Gets the
| |
| set | back to summary |
|---|---|
| public Http2Headers set(CharSequence name, CharSequence value) Overrides io. Implements io. Doc from io. Sets a header with the specified
| |
| set | back to summary |
|---|---|
| public Http2Headers set(CharSequence name, Iterable<? extends CharSequence> values) Overrides io. Implements io. Doc from io. Sets a new header with the specified
headers.remove(name);
for (T value : values) {
headers.add(name, value);
}
| |
| set | back to summary |
|---|---|
| public Http2Headers set(CharSequence name, Iterator<? extends CharSequence> valueItr) Overrides default io. Doc from io. Sets a new header with the specified
headers.remove(name);
while (valueItr.hasNext()) {
headers.add(name, valueItr.next());
}
| |
| set | back to summary |
|---|---|
| public Http2Headers set(CharSequence name, CharSequence... values) Overrides io. Overrides default io. Doc from io. Sets a header with the specified
headers.remove(name);
for (T value : values) {
headers.add(name, value);
}
| |
| set | back to summary |
|---|---|
| public Http2Headers set(final HttpHeaders headers) Overrides default io. Doc from io. Clears the current header entries and copies all header entries of the specified
| |
| status | back to summary |
|---|---|
| public Http2Headers status(CharSequence value) Implements io. Doc from io. Sets the
| |
| status | back to summary |
|---|---|
| public CharSequence status() Implements io. Doc from io. Gets the
| |
| validateKey | back to summary |
|---|---|
| protected CharSequence validateKey(@Nullable CharSequence name, boolean forAdd) Implements abstract io. Doc from io. Validate the key before inserting it into this
| |
| validateValue | back to summary |
|---|---|
| protected CharSequence validateValue(CharSequence key, CharSequence value) Overrides io. Doc from io. Validate the value before inserting it into this
| |