| 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 boolean | Returns: true if at least one header with the name is
contained, false otherwisethe header name to test for name)Implements org. |
| public int | Returns: number of occurrences of the header in the message.the header name to check for. name)Implements org. |
| 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)Implements org. |
| public Header | Returns: the first header ornullthe name of the header to get name)Implements org. |
| public Header[] | Returns: an array of length ≥ 0the name of the header(s) to get name)Implements org. |
| public Header[] | Returns: an array of length ≥ 0Implements org. |
| public Header | Returns: the last header ornullthe name of the header to get name)Implements org. |
| private boolean | |
| public Iterator | Returns: iterator over this group of headers.Implements org. |
| public Iterator | Returns: iterator over some headers in this group.the name of the headers over which to iterate, or
name)null for all headersImplements org. |
| public boolean | Returns: true if a header was removed as a result of this call.the header to remove header)Removes the first given header. |
| public boolean | Returns: true if any header was removed as a result of this call.the header to remove header)Removes all headers that match the given header. |
| public boolean | Returns: true if any header was removed as a result of this call.the name of the headers to be removed. name)Removes all headers with a given name in this group. |
| 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 |
| 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 all headers. | |
| containsHeader | back to summary |
|---|---|
| public boolean containsHeader(final String name) Implements org. Tests if headers with the given name are contained within this group. Header name comparison is case insensitive. | |
| countHeaders | back to summary |
|---|---|
| public int countHeaders(final String name) Implements org. Checks if a certain header is present in this message and how many times. Header name comparison is case insensitive. | |
| 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 ",". Header name comparison is case insensitive. | |
| getFirstHeader | back to summary |
|---|---|
| public Header getFirstHeader(final String name) Implements org. Gets the first header with the given name. Header name comparison is case insensitive. | |
| getHeader | back to summary |
|---|---|
| public Header getHeader(final String name) throws ProtocolException Implements org. Gets single first header with the given name. Header name comparison is case insensitive.
| |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders(final String name) Implements org. 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. | |
| getHeaders | back to summary |
|---|---|
| public Header[] getHeaders() Implements org. Gets all of the headers contained within this group. | |
| getLastHeader | back to summary |
|---|---|
| public Header getLastHeader(final String name) Implements org. Gets the last header with the given name. Header name comparison is case insensitive. | |
| headerEquals | back to summary |
|---|---|
| private boolean headerEquals(final Header header1, final Header header2) | |
| headerIterator | back to summary |
|---|---|
| public Iterator Implements org. Returns an iterator over this group of headers. | |
| headerIterator | back to summary |
|---|---|
| public Iterator Implements org. Returns an iterator over the headers with a given name in this group. | |
| removeHeader | back to summary |
|---|---|
| public boolean removeHeader(final Header header) Removes the first given header.
| |
| removeHeaders | back to summary |
|---|---|
| public boolean removeHeaders(final Header header) Removes all headers that match the given header.
| |
| removeHeaders | back to summary |
|---|---|
| public boolean removeHeaders(final String name) Removes all headers with a given name in this group.
| |
| setHeader | back to summary |
|---|---|
| public void setHeader(final Header header) Replaces the first occurrence 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.
| |
| 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. | |