|
|||||||||
| Home >> All >> org >> apache >> http >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.http.impl
Class HeaderGroup

java.lang.Objectorg.apache.http.impl.HeaderGroup
- public class HeaderGroup
- extends java.lang.Object
A class for combining a set of headers. This class allows for multiple headers with the same name and keeps track of the order in which headers were added.
- Since:
- 2.0beta1
| Field Summary | |
private java.util.List |
headers
The list of headers for this group, in the order in which they were added |
| Constructor Summary | |
HeaderGroup()
Constructor for HeaderGroup. |
|
| Method Summary | |
void |
addHeader(org.apache.http.Header header)
Adds the given header to the group. |
void |
clear()
Removes any contained headers. |
boolean |
containsHeader(java.lang.String name)
Tests if headers with the given name are contained within this group. |
org.apache.http.Header[] |
getAllHeaders()
Gets all of the headers contained within this group. |
org.apache.http.Header |
getCondensedHeader(java.lang.String name)
Gets a header representing all of the header values with the given name. |
org.apache.http.Header |
getFirstHeader(java.lang.String name)
Gets the first header with the given name. |
org.apache.http.Header[] |
getHeaders(java.lang.String name)
Gets all of the headers with the given name. |
org.apache.http.Header |
getLastHeader(java.lang.String name)
Gets the last header with the given name. |
java.util.Iterator |
iterator()
Returns an iterator over this group of headers. |
void |
removeHeader(org.apache.http.Header header)
Removes the given header. |
void |
setHeaders(org.apache.http.Header[] headers)
Sets all of the headers contained within this group overriding any existing headers. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
headers
private java.util.List headers
- The list of headers for this group, in the order in which they were added
| Constructor Detail |
HeaderGroup
public HeaderGroup()
- Constructor for HeaderGroup.
| Method Detail |
clear
public void clear()
- Removes any contained headers.
addHeader
public void addHeader(org.apache.http.Header header)
- Adds the given header to the group. The order in which this header was
added is preserved.
removeHeader
public void removeHeader(org.apache.http.Header header)
- Removes the given header.
setHeaders
public void setHeaders(org.apache.http.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.
getCondensedHeader
public org.apache.http.Header getCondensedHeader(java.lang.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.
getHeaders
public org.apache.http.Header[] getHeaders(java.lang.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.
getFirstHeader
public org.apache.http.Header getFirstHeader(java.lang.String name)
- Gets the first header with the given name.
Header name comparison is case insensitive.
getLastHeader
public org.apache.http.Header getLastHeader(java.lang.String name)
- Gets the last header with the given name.
Header name comparison is case insensitive.
getAllHeaders
public org.apache.http.Header[] getAllHeaders()
- Gets all of the headers contained within this group.
containsHeader
public boolean containsHeader(java.lang.String name)
- Tests if headers with the given name are contained within this group.
Header name comparison is case insensitive.
iterator
public java.util.Iterator iterator()
- Returns an iterator over this group of headers.
- Since:
- 4.0
|
|||||||||
| Home >> All >> org >> apache >> http >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.http.impl.HeaderGroup