@Contract(threading=IMMUTABLE) public class BasicHeader extends java.lang.Object implements Header, java.lang.Cloneable, java.io.Serializable
Header.| Constructor and Description |
|---|
BasicHeader(java.lang.String name,
java.lang.String value)
Constructs with name and value.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
HeaderElement[] |
getElements()
Parses the value.
|
java.lang.String |
getName()
Gets the name of this pair.
|
java.lang.String |
getValue()
Gets the value of this pair.
|
java.lang.String |
toString() |
public BasicHeader(java.lang.String name,
java.lang.String value)
name - the header namevalue - the header valuepublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic HeaderElement[] getElements() throws ParseException
HeadergetElements in interface HeaderHeaderElement entries, may be empty, but is never nullParseException - in case of a parsing errorpublic java.lang.String getName()
NameValuePairgetName in interface NameValuePairnull.public java.lang.String getValue()
NameValuePairgetValue in interface NameValuePairnull.public java.lang.String toString()
toString in class java.lang.Object