Home » HttpComponents-Core-4.0.1 » org.apache.http.impl » [javadoc | source]
org.apache.http.impl
public class: HeaderGroup [javadoc | source]
java.lang.Object
   org.apache.http.impl.HeaderGroup
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.
Constructor:
 public HeaderGroup() 
Method from org.apache.http.impl.HeaderGroup Summary:
addHeader,   clear,   containsHeader,   getAllHeaders,   getCondensedHeader,   getFirstHeader,   getHeaders,   getLastHeader,   iterator,   removeHeader,   setHeaders
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.http.impl.HeaderGroup Detail:
 public  void addHeader(Header header) 
    Adds the given header to the group. The order in which this header was added is preserved.
 public  void clear() 
    Removes any contained headers.
 public boolean containsHeader(String name) 
    Tests if headers with the given name are contained within this group.

    Header name comparison is case insensitive.

 public Header[] getAllHeaders() 
    Gets all of the headers contained within this group.
 public Header getCondensedHeader(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.

 public Header getFirstHeader(String name) 
    Gets the first header with the given name.

    Header name comparison is case insensitive.

 public Header[] getHeaders(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.

 public Header getLastHeader(String name) 
    Gets the last header with the given name.

    Header name comparison is case insensitive.

 public Iterator iterator() 
    Returns an iterator over this group of headers.
 public  void removeHeader(Header header) 
    Removes the given header.
 public  void setHeaders(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.