HttpHeaders.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final DefaultHeaders |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultHttpHeaders(boolean
Should Netty validate header values to ensure they aren't malicious. validate)
Deprecated
Prefer using the
DefaultHttpHeaders() constructor instead,
to always have validation enabled.
Warning Setting |
| protected | DefaultHttpHeaders(boolean
Should Netty validate header values to ensure they aren't malicious. validateValues, DefaultHeaders.The nameValidatorNameValidator to use, never {@code null.Create an HTTP headers object with the given name validator. |
| protected | DefaultHttpHeaders(DefaultHeaders.
The nameValidator,NameValidator to use, never null.The valueValidatorValueValidator to use, never null.Create an HTTP headers object with the given name and value validators. |
| protected | DefaultHttpHeaders(DefaultHeaders.
The nameValidator,NameValidator to use, never null.The valueValidator,ValueValidator to use, never null.A hint about the anticipated number of entries. sizeHint)Create an HTTP headers object with the given name and value validators. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | add(HttpHeaders headers)
Overrides io. headers.
|
| public HttpHeaders | |
| public HttpHeaders | add(CharSequence
The name of the header being added name, Object The value of the header being added value)Overrides io. |
| public HttpHeaders | add(String name, Iterable<?> values)
Implements abstract io. |
| public HttpHeaders | add(CharSequence
The name of the headers being set name, Iterable<?> The values of the headers being set values)Overrides io. |
| public HttpHeaders | addInt(CharSequence
The name to modify name, int The value value)Implements abstract io. name to value.
|
| public HttpHeaders | addShort(CharSequence
The name to modify name, short The value value)Implements abstract io. name to value.
|
| public HttpHeaders | clear()
Implements abstract io. HttpMessage.
|
| public boolean | |
| public boolean | contains(CharSequence
The name of the header to search for name)
Checks to see if there is a header with the specified name
|
| public boolean | |
| 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.Overrides io. true if a header with the name and value exists, false otherwise.
|
| public HttpHeaders | copy()
Overrides io. HttpHeaders.
|
| public List | entries()
Implements abstract io. List that contains all headers in this object.
|
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public String | |
| public String | get(CharSequence
The name of the header to search name)Overrides io. |
| public List | |
| public List | getAll(CharSequence
The name of the headers to search name)
Returns the values of headers with the specified name
|
| public Integer | getInt(CharSequence
the name of the header to search name)Implements abstract io. |
| public int | getInt(CharSequence
the name of the header to search name, int the default value defaultValue)Implements abstract io. |
| public Short | getShort(CharSequence
the name of the header to search name)Implements abstract io. |
| public short | getShort(CharSequence
the name of the header to search name, short the default value defaultValue)Implements abstract io. |
| public Long | getTimeMillis(CharSequence
the name of the header to search name)Implements abstract io. |
| public long | getTimeMillis(CharSequence
the name of the header to search name, long the default value defaultValue)Implements abstract io. |
| public int | |
| public boolean | isEmpty()
Implements abstract io. |
| public Iterator | iterator()
Implements abstract io. Implements java.
Deprecated
Returns an iterator over elements of type T.
|
| public Iterator | iteratorCharSequence()
Implements abstract io. |
| public Set | names()
Implements abstract io. Set that contains the names of all headers in this object.
|
| pack-priv static DefaultHeaders. | |
| public HttpHeaders | |
| public HttpHeaders | remove(CharSequence
The name of the header to remove name)
Removes the header with the specified name.
|
| public HttpHeaders | set(HttpHeaders headers)
Overrides io. headers.
|
| public HttpHeaders | |
| public HttpHeaders | set(CharSequence
The name of the header being set name, Object The value of the header being set value)Overrides io. |
| public HttpHeaders | set(String name, Iterable<?> values)
Implements abstract io. |
| public HttpHeaders | set(CharSequence
The name of the headers being set name, Iterable<?> The values of the headers being set values)Overrides io. |
| public HttpHeaders | setInt(CharSequence
The name to modify name, int The value value)Implements abstract io. name to value.
|
| public HttpHeaders | setShort(CharSequence
The name to modify name, short The value value)Implements abstract io. name to value.
|
| public int | size()
Implements abstract io. |
| public Iterator | valueCharSequenceIterator(CharSequence
the name of the header to retrieve name)Overrides io. getAll(String) but it is possible that no intermediate list is generated.
|
| pack-priv static ValueConverter | |
| public Iterator | valueStringIterator(CharSequence
the name of the header to retrieve name)Overrides io. getAll(String) but it is possible that no intermediate list is generated.
|
| pack-priv static DefaultHeaders. |