Package org.apache.http.message
Class BasicHeader
- java.lang.Object
-
- org.apache.http.message.BasicHeader
-
- All Implemented Interfaces:
Serializable,Cloneable,Header
@Contract(threading=IMMUTABLE) public class BasicHeader extends Object implements Header, Cloneable, Serializable
Basic implementation ofHeader.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicHeader(String name, String value)Constructor with name and value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()HeaderElement[]getElements()Parses the value.StringgetName()Get the name of the Header.StringgetValue()Get the value of the Header.StringtoString()
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:HeaderGet the name of the Header.
-
getValue
public String getValue()
Description copied from interface:HeaderGet the value of the Header.
-
getElements
public HeaderElement[] getElements() throws ParseException
Description copied from interface:HeaderParses the value.- Specified by:
getElementsin interfaceHeader- Returns:
- an array of
HeaderElemententries, may be empty, but is nevernull - Throws:
ParseException- in case of a parsing error
-
clone
public Object clone() throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
-
-