HttpHeaders.
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 | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | |
| protected final boolean | |
| protected final boolean |
| Access | Constructor and Description |
|---|---|
| public | DefaultHttpHeaders(final 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, final boolean true to validate header names.true to validate cookie contents when parsing.true to validate header values.Create a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | add(final CharSequence
the name of the header. name, final CharSequence the value of the header. value)Implements io. name and value.
|
| public HttpHeaders | add(final CharSequence
the name of the header. name, final Iterable<? extends CharSequence> the values of the header. values)Implements io. name and values.
|
| public HttpHeaders | add(final CharSequence
the name of the header. name, final CharSequence... the values of the header. values)Implements io. name and values.
|
| public HttpHeaders | add(final HttpHeaders
the headers to add. headers)Implements io. headers to this object.
|
| public HttpHeaders | addCookie(final HttpCookiePair
the cookie to add. cookie)Implements io. |
| public HttpHeaders | addSetCookie(final HttpSetCookie
the cookie to add. cookie)Implements io. |
| public HttpHeaders | |
| public boolean | contains(CharSequence
the header name. key, CharSequence the header value of the header to find. value)Overrides io. Overrides default io. true if a header with the name and value exists, false otherwise.
|
| private static boolean | containsCommaSeparatedTrimmed(CharSequence expected, CharSequence rawNext, BiPredicate<CharSequence, CharSequence> equality)
|
| private static boolean | |
| private static boolean | |
| public boolean | containsIgnoreCase(final CharSequence
the name of the header to find. name, final CharSequence the value of the header to find. value)Overrides default io. true if a header with the name and value exists, false otherwise.
|
| public HttpHeaders | copy()
Implements io. |
| protected boolean | equals(final CharSequence
The first key. name1, final CharSequence The second key. name2)Implements abstract io. key1 and key2 for equality.
|
| protected boolean | equalsForValue(final CharSequence
The first value. value1, final CharSequence The second value. value2)Implements abstract io. value1 and value2 for equality.
|
| private static @Nullable MultiMap. | findCookieHeader(int cookieHeaderNameHash, @Nullable MultiMap.
|
| public @Nullable CharSequence | get(final CharSequence
the name of the header to retrieve. name)Implements io. |
| public @Nullable CharSequence | getAndRemove(final CharSequence
the name of the header to retrieve. name)Implements io. |
| public @Nullable HttpCookiePair | getCookie(final CharSequence
the cookie-name to look for. name)Implements io. name.
|
| public Iterator | getCookiesIterator()
Implements io. |
| public Iterator | getCookiesIterator(final CharSequence
the cookie-name of the name)HttpSetCookies to get.Implements io. |
| public @Nullable HttpSetCookie | getSetCookie(final CharSequence
the cookie-name to look for. name)Implements io. name.
|
| public Iterator | getSetCookiesIterator()
Implements io. |
| public Iterator | getSetCookiesIterator(final CharSequence
the cookie-name of the name)HttpSetCookies to get.Implements io. |
| public Iterator | getSetCookiesIterator(final CharSequence
the cookie-name of the name, final CharSequence HttpSetCookies to get.the domain-value of the domain, final CharSequence HttpSetCookies to get. This value may be matched according
to the Domain Matching algorithm.the path-av of the path)HttpSetCookies to get. This value may be matched according
to the Path Matching algorithm.Implements io. |
| protected int | hashCode(final CharSequence
The key to create the hash code for. name)Implements abstract io. key used as an index in this MultiMap.
|
| protected int | hashCodeForValue(final CharSequence
the value to generate a hash code for. value)Implements abstract io. value using for equality comparisons and hashCode(Object).
|
| protected boolean | isKeyEqualityCompatible(final MultiMap<? extends CharSequence, ? extends CharSequence>
the multiMap)MultiMap to compare.Implements abstract io. hashCode(Object) and equals(Object, Object) strategy are compatible with
multiMap.
|
| public Iterator | iterator()
Implements io. T.
|
| public Set | names()
Implements io. Set of all header names in this object.
|
| public boolean | remove(final CharSequence
the name of the header. name)Implements io. name.
|
| public boolean | remove(final CharSequence
the name of the header. name, final CharSequence the value of the header to remove. value)Implements io. name.
|
| private boolean | |
| public boolean | removeCookies(final CharSequence
the cookie-name of the name)HttpSetCookies to remove.Implements io. name.
|
| public boolean | removeIgnoreCase(final CharSequence
the name of the header. name, final CharSequence the value of the header to remove. value)Implements io. name.
|
| public boolean | removeSetCookies(final CharSequence
the cookie-name of the name)HttpSetCookies to remove.Implements io. name.
|
| public boolean | removeSetCookies(final CharSequence
the cookie-name of the name, final CharSequence HttpSetCookies to remove.the domain-value of the domain, final CharSequence HttpSetCookies to remove. This value may be matched according
to the Domain Matching algorithm.the path-av of the path)HttpSetCookies to remove. This value may be matched according
to the Path Matching algorithm.Implements io. name.
|
| public HttpHeaders | set(final CharSequence
the name of the header. name, final CharSequence the value of the header. value)Implements io. name and value.
|
| public HttpHeaders | set(final CharSequence
the name of the header. name, final Iterable<? extends CharSequence> the values of the header. values)Implements io. name and values.
|
| public HttpHeaders | set(final CharSequence
the name of the header. name, final CharSequence... the values of the header. values)Overrides default io. name and values.
|
| public String | toString()
Overrides java. Implements io. String representation of this HttpHeaders.
|
| protected static void | validateHeaderName(final CharSequence
The filed-name to validate. name)Validate a field-name of a header-field. |
| private static void | validateHeaderValue(final CharSequence
The field-value to validate. value)Validate a field-value of a header-field. |
| protected CharSequence | validateKey(final @Nullable CharSequence
The key which will be inserted. name, boolean true if this validation is for adding to the headers, or false if this is for
setting (overwriting) the given header.Implements abstract io. MultiMap.
|
| protected CharSequence | validateValue(CharSequence
The key for which the value is being inserted, for reference. key, final CharSequence The value which will be inserted. value)Implements abstract io. MultiMap.
|
| public Iterator | valuesIterator(final CharSequence
the name of the header to retrieve. name)Implements io. |