org.apache.commons.httpclient
public class HeaderGroup extends Object
Since: 2.0beta1
Constructor Summary | |
---|---|
HeaderGroup()
Constructor for HeaderGroup. |
Method Summary | |
---|---|
void | addHeader(Header header)
Adds the given header to the group. |
void | clear()
Removes any contained headers. |
boolean | containsHeader(String name)
Tests if headers with the given name are contained within this group.
|
Header[] | getAllHeaders()
Gets all of the headers contained within this group.
|
Header | getCondensedHeader(String name)
Gets a header representing all of the header values with the given name.
|
Header | getFirstHeader(String name)
Gets the first header with the given name.
|
Header[] | getHeaders(String name)
Gets all of the headers with the given name. |
Iterator | getIterator()
Returns an iterator over this group of headers.
|
Header | getLastHeader(String name)
Gets the last header with the given name.
|
void | removeHeader(Header header)
Removes the given header.
|
void | setHeaders(Header[] headers)
Sets all of the headers contained within this group overriding any
existing headers. |
Parameters: header the header to add
Header name comparison is case insensitive.
Parameters: name the header name to test for
Returns: true
if at least one header with the name is
contained, false
otherwise
Returns: an array of length >= 0
Header name comparison is case insensitive.
Parameters: name the name of the header(s) to get
Returns: a header with a condensed value or null
if no
headers by the given name are present
Header name comparison is case insensitive.
Parameters: name the name of the header to get
Returns: the first header or null
Header name comparison is case insensitive.
Parameters: name the name of the header(s) to get
Returns: an array of length >= 0
Returns: iterator over this group of headers.
Since: 3.0
Header name comparison is case insensitive.
Parameters: name the name of the header to get
Returns: the last header or null
Parameters: header the header to remove
Parameters: headers the headers to set