| Modifier and Type | Field and Description |
|---|---|
| private static final Header[] | |
| private final List | headers
The list of headers for this group, in the order in which they were added |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Object | |
| public boolean | Returns: true if at least one header with the name is
contained, false otherwisethe header name to test for name)Tests if headers with the given name are contained within this group. |
| public HeaderGroup | |
| public Header[] | |
| public Header | Returns: a header with a condensed value ornull if no
headers by the given name are presentthe name of the header(s) to get name)Gets a header representing all of the header values with the given name. |
| public Header | Returns: the first header ornullthe name of the header to get name)Gets the first header with the given name. |
| public Header[] | Returns: an array of length ≥ 0the name of the header(s) to get name)Gets all of the headers with the given name. |
| public Header | Returns: the last header ornullthe name of the header to get name)Gets the last header with the given name. |
| public HeaderIterator | Returns: iterator over this group of headers.Returns an iterator over this group of headers. |
| public HeaderIterator | |
| public void | |
| public void | setHeaders(final Header[]
the headers to set headers)Sets all of the headers contained within this group overriding any existing headers. |
| public String | |
| public void | updateHeader(final Header
the new header that should replace the first header with the same
name if present in the list. header)Replaces the first occurence of the header with the same name. |
| EMPTY | back to summary |
|---|---|
| private static final Header[] EMPTY | |
| headers | back to summary |
|---|---|
| private final List<Header> headers The list of headers for this group, in the order in which they were added | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| HeaderGroup | back to summary |
|---|---|
| public HeaderGroup() Constructor for HeaderGroup. | |
| addHeader | back to summary |
|---|---|
| public void addHeader(final Header header) Adds the given header to the group. The order in which this header was added is preserved.
| |
| clear | back to summary |
|---|---|
| public void clear() Removes any contained headers. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| containsHeader | back to summary |
|---|---|
| public boolean containsHeader(final String name) Tests if headers with the given name are contained within this group. Header name comparison is case insensitive.
| |
| copy | back to summary |
|---|---|
| public HeaderGroup copy() Returns a copy of this object
| |
| getAllHeaders | back to summary |
|---|---|
| public Header[] getAllHeaders() Gets all of the headers contained within this group.
| |
| getCondensedHeader | back to summary |
|---|---|
| public Header getCondensedHeader(final String name) Gets a header representing all of the header values with the given name. If more that one header with the given name exists the values will be combined with a "," as per RFC 2616. Header name comparison is case insensitive. | |
| getFirstHeader | back to summary |
|---|---|
| public Header getFirstHeader(final String name) Gets the first header with the given name. Header name comparison is case insensitive. | |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders(final String name) Gets all of the headers with the given name. The returned array maintains the relative order in which the headers were added. Header name comparison is case insensitive. | |
| getLastHeader | back to summary |
|---|---|
| public Header getLastHeader(final String name) Gets the last header with the given name. Header name comparison is case insensitive. | |
| iterator | back to summary |
|---|---|
| public HeaderIterator iterator() Returns an iterator over this group of headers.
| |
| iterator | back to summary |
|---|---|
| public HeaderIterator iterator(final String name) Returns an iterator over the headers with a given name in this group.
| |
| removeHeader | back to summary |
|---|---|
| public void removeHeader(final Header header) Removes the given header.
| |
| setHeaders | back to summary |
|---|---|
| public void setHeaders(final Header[] headers) Sets all of the headers contained within this group overriding any existing headers. The headers are added in the order in which they appear in the array.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| updateHeader | back to summary |
|---|---|
| public void updateHeader(final Header header) Replaces the first occurence of the header with the same name. If no header with the same name is found the given header is added to the end of the list.
| |