HttpHeaders 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 DefaultHttpHeaders if your have a fixed set of headers which will not
change.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final CharSequence[] |
| Access | Constructor and Description |
|---|---|
| public | ReadOnlyHttpHeaders(boolean
true to validate the contents of each header name.An array of the structure nameValuePairs)[<name,value>,<name,value>,...].
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.Create a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | |
| public HttpHeaders | add(String name, Iterable<?> values)
Implements abstract 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 | |
| public boolean | containsValue(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 List | entries()
Implements abstract io. List that contains all headers in this object.
|
| public String | |
| private CharSequence | |
| public List | |
| 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 boolean | isEmpty()
Implements abstract io. |
| public Iterator | iterator()
Implements abstract io. Implements java. T.
|
| public Iterator | iteratorCharSequence()
Implements abstract io. |
| public Set | names()
Implements abstract io. Set that contains the names of all headers in this object.
|
| private static IllegalArgumentException | |
| public HttpHeaders | |
| public HttpHeaders | |
| public HttpHeaders | set(String name, Iterable<?> values)
Implements abstract 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. |
| private static void | |
| 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.
|
| 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.
|