Package org.apache.http.message
Class BasicHeader
- java.lang.Object
-
- org.apache.http.message.BasicHeader
-
- All Implemented Interfaces:
Serializable,Cloneable,Header,NameValuePair
@Contract(threading=IMMUTABLE) public class BasicHeader extends Object implements Header, Cloneable, Serializable
Implements a basicHeader.- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicHeader(String name, String value)Constructs with name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()HeaderElement[]getElements()Parses the value.StringgetName()Gets the name of this pair.StringgetValue()Gets the value of this pair.StringtoString()
-
-
-
Method Detail
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
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
-
getName
public String getName()
Description copied from interface:NameValuePairGets the name of this pair.- Specified by:
getNamein interfaceNameValuePair- Returns:
- the name of this pair, never
null.
-
getValue
public String getValue()
Description copied from interface:NameValuePairGets the value of this pair.- Specified by:
getValuein interfaceNameValuePair- Returns:
- the value of this pair, may be
null.
-
-