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 basic
Header
.- Since:
- 4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final HeaderElement[]
private final String
private static final long
private final String
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY_HEADER_ELEMENTS
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
value
-
-
Constructor Details
-
BasicHeader
Constructs with name and value.- Parameters:
name
- the header namevalue
- the header value
-
-
Method Details
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getElements
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
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
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
.
-
toString
-