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 Object
clone()
HeaderElement[]
getElements()
Parses the value.String
getName()
Gets the name of this pair.String
getValue()
Gets the value of this pair.String
toString()
-
-
-
Method Detail
-
clone
public Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getElements
public HeaderElement[] getElements() throws ParseException
Description copied from interface:Header
Parses the value.- Specified by:
getElements
in interfaceHeader
- Returns:
- an array of
HeaderElement
entries, may be empty, but is nevernull
- Throws:
ParseException
- in case of a parsing error
-
getName
public String getName()
Description copied from interface:NameValuePair
Gets the name of this pair.- Specified by:
getName
in interfaceNameValuePair
- Returns:
- the name of this pair, never
null
.
-
getValue
public String getValue()
Description copied from interface:NameValuePair
Gets the value of this pair.- Specified by:
getValue
in interfaceNameValuePair
- Returns:
- the value of this pair, may be
null
.
-
-