| java.lang.Object | |
| ↳ | org.apache.http.message.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.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          | 
        
          
          Constructor for HeaderGroup.
          
         | 
       ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          | 
        
          
          Adds the given header to the group.
          
         | 
       ||||||||||
| 
          | 
        
          
          Removes any contained headers.
          
         | 
       ||||||||||
| 
          | 
        
          
          Creates and returns a copy of this
           
        
           Object
          
          .
          | 
       ||||||||||
| 
          | 
        
          
          Tests if headers with the given name are contained within this group.
          
         | 
       ||||||||||
| 
          | 
        
          
          Returns a copy of this object
          
         | 
       ||||||||||
| 
          | 
        
          
          Gets all of the headers contained within this group.
          
         | 
       ||||||||||
| 
          | 
        
          
          Gets a header representing all of the header values with the given name.
          
         | 
       ||||||||||
| 
          | 
        
          
          Gets the first header with the given name.
          
         | 
       ||||||||||
| 
          | 
        
          
          Gets all of the headers with the given name.
          
         | 
       ||||||||||
| 
          | 
        
          
          Gets the last header with the given name.
          
         | 
       ||||||||||
| 
          | 
        
          
          Returns an iterator over this group of headers.
          
         | 
       ||||||||||
| 
          | 
        
          
          Returns an iterator over the headers with a given name in this group.
          
         | 
       ||||||||||
| 
          | 
        
          
          Removes the given header.
          
         | 
       ||||||||||
| 
          | 
        
          
          Sets all of the headers contained within this group overriding any
 existing headers.
          
         | 
       ||||||||||
| 
          | 
        
          
          Replaces the first occurence of the header with the same name.
          
         | 
       ||||||||||
| 
         
          [Expand]
         
          
          Inherited Methods
          
         | 
       |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
         
           
         
         From class
         
          java.lang.Object
         
          | 
       |||||||||||
Adds the given header to the group. The order in which this header was added is preserved.
| header | the header to add | 
|---|
         Creates and returns a copy of this
         
          Object
         
         . The default
 implementation returns a so-called "shallow" copy: It creates a new
 instance of the same class and then copies the field values (including
 object references) from this instance to the new instance. A "deep" copy,
 in contrast, would also recursively clone nested objects. A subclass that
 needs to implement this kind of cloning should call
         
          super.clone()
         
         to create the new instance and then create deep copies of the nested,
 mutable objects.
        
| CloneNotSupportedException | 
|---|
Tests if headers with the given name are contained within this group.
Header name comparison is case insensitive.
| name | the header name to test for | 
|---|
           true
          
          if at least one header with the name is
 contained,
          
           false
          
          otherwise
         Returns a copy of this object
Gets all of the headers contained within this group.
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.
| name | the name of the header(s) to get | 
|---|
           null
          
          if no
 headers by the given name are present
         Gets the first header with the given name.
Header name comparison is case insensitive.
| name | the name of the header to get | 
|---|
           null
          
         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.
| name | the name of the header(s) to get | 
|---|
Gets the last header with the given name.
Header name comparison is case insensitive.
| name | the name of the header to get | 
|---|
           null
          
         Returns an iterator over this group of headers.
Returns an iterator over the headers with a given name in this group.
| name | 
           the name of the headers over which to iterate, or
           
            null
           
           for all headers
           | 
         
|---|
Removes the given header.
| header | the header to remove | 
|---|
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.
| headers | the headers to set | 
|---|
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.
| header | the new header that should replace the first header with the same name if present in the list. | 
|---|