header value consisting of
a name / value pair and a number of optional name / value parameters.
Some HTTP headers (such as the set-cookie header) have values that can be decomposed into multiple elements. Such headers must be in the following form:
header = [ element ] *( "," [ element ] )
element = name [ "=" [ value ] ] *( ";" [ param ] )
param = name [ "=" [ value ] ]
name = token
value = ( token | quoted-string )
token = 1*<any char except "=", ",", ";", <"> and
white space>
quoted-string = <"> *( text | quoted-char ) <">
text = any char except <">
quoted-char = "\" char
Any amount of white space is allowed between any part of the
header, element or param and is ignored. A missing value in any
element or param will be stored as the empty String;
if the "=" is also missing null will be stored instead.
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public NameValuePair | |
| public NameValuePair | Returns: name / value pairparameter name name)Returns the first parameter with the given name. |
| public int | |
| public NameValuePair[] | |
| public String |
| getName | back to summary |
|---|---|
| public String getName() Returns header element name.
| |
| getParameter | back to summary |
|---|---|
| public NameValuePair getParameter(int index) Returns parameter with the given index.
| |
| getParameterByName | back to summary |
|---|---|
| public NameValuePair getParameterByName(String name) Returns the first parameter with the given name.
| |
| getParameterCount | back to summary |
|---|---|
| public int getParameterCount() Returns the total count of parameters.
| |
| getParameters | back to summary |
|---|---|
| public NameValuePair[] getParameters() Returns an array of name / value pairs.
| |
| getValue | back to summary |
|---|---|
| public String getValue() Returns header element value.
| |