| Modifier and Type | Field and Description |
|---|---|
| public static final BasicHeaderValueParser | DEFAULT
A default instance of this class, for use as default or fallback. |
| private static final char | |
| public static final BasicHeaderValueParser | |
| private static final char | |
| private static final BitSet | |
| private final TokenParser | |
| private static final BitSet |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected HeaderElement | Returns: a header element representing the argumentCreates a header element. |
| protected NameValuePair | Returns: a name-value pair representing the argumentsthe name name, final String the value, or value)nullCreates a name-value pair. |
| public static HeaderElement[] | Returns: array holding the header elements, nevernullthe header value to parse value, final HeaderValueParser the parser to use, or parser)null for defaultParses elements with the given parser. |
| public HeaderElement[] | parseElements(final CharArrayBuffer
buffer holding the header value to parse buffer, final ParserCursor the parser cursor containing the current position and
the bounds within the buffer for the parsing operation cursor)Implements org. |
| public static HeaderElement | Returns: the parsed header elementthe header element to parse value, final HeaderValueParser the parser to use, or parser)null for defaultParses an element with the given parser. |
| public HeaderElement | parseHeaderElement(final CharArrayBuffer
buffer holding the element to parse buffer, final ParserCursor the parser cursor containing the current position and
the bounds within the buffer for the parsing operation cursor)Implements org. |
| public static NameValuePair | Returns: the parsed name-value pairthe NVP to parse value, final HeaderValueParser the parser to use, or parser)null for defaultParses a name-value-pair with the given parser. |
| public NameValuePair | parseNameValuePair(final CharArrayBuffer
the buffer holding the name-value pair to parse buffer, final ParserCursor the parser cursor containing the current position and
the bounds within the buffer for the parsing operation cursor)Implements org. |
| public NameValuePair | parseNameValuePair(final CharArrayBuffer buffer, final ParserCursor cursor, final char[] delimiters)
Deprecated
(4.4) use
org.
|
| public static NameValuePair[] | Returns: array holding the parameters, nevernullthe parameter list to parse value, final HeaderValueParser the parser to use, or parser)null for defaultParses parameters with the given parser. |
| public NameValuePair[] | parseParameters(final CharArrayBuffer
buffer holding the name-value list to parse buffer, final ParserCursor the parser cursor containing the current position and
the bounds within the buffer for the parsing operation cursor)Implements org. |
| DEFAULT | back to summary |
|---|---|
| public static final BasicHeaderValueParser DEFAULT
Deprecated (4.3) use A default instance of this class, for use as default or fallback.
Note that | |
| ELEM_DELIMITER | back to summary |
|---|---|
| private static final char ELEM_DELIMITER | |
| INSTANCE | back to summary |
|---|---|
| public static final BasicHeaderValueParser INSTANCE | |
| PARAM_DELIMITER | back to summary |
|---|---|
| private static final char PARAM_DELIMITER | |
| TOKEN_DELIMS | back to summary |
|---|---|
| private static final BitSet TOKEN_DELIMS | |
| tokenParser | back to summary |
|---|---|
| private final TokenParser tokenParser | |
| VALUE_DELIMS | back to summary |
|---|---|
| private static final BitSet VALUE_DELIMS | |
| BasicHeaderValueParser | back to summary |
|---|---|
| public BasicHeaderValueParser() | |
| createHeaderElement | back to summary |
|---|---|
| protected HeaderElement createHeaderElement(final String name, final String value, final NameValuePair[] params) Creates a header element.
Called from
| |
| createNameValuePair | back to summary |
|---|---|
| protected NameValuePair createNameValuePair(final String name, final String value) Creates a name-value pair.
Called from
| |
| parseElements | back to summary |
|---|---|
| public static HeaderElement[] parseElements(final String value, final HeaderValueParser parser) throws ParseException Parses elements with the given parser.
| |
| parseElements | back to summary |
|---|---|
| public HeaderElement[] parseElements(final CharArrayBuffer buffer, final ParserCursor cursor) Implements org. Doc from org. Parses a header value into elements.
Parse errors are indicated as Some HTTP headers (such as the set-cookie header) have values that can be decomposed into multiple elements. In order to be processed by this parser, 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 Note that this parser does not apply to list-typed HTTP header fields in general; it is only suitable for fields that use the syntax described above. Counter-examples are "Link" (RFC 8288), "If-None-Match" (RFC 7232) or "Dav" (RFC 4918).
| |
| parseHeaderElement | back to summary |
|---|---|
| public static HeaderElement parseHeaderElement(final String value, final HeaderValueParser parser) throws ParseException Parses an element with the given parser.
| |
| parseHeaderElement | back to summary |
|---|---|
| public HeaderElement parseHeaderElement(final CharArrayBuffer buffer, final ParserCursor cursor) Implements org. Doc from org. Parses a single header element. A header element consist of a semicolon-separate list of name=value definitions.
| |
| parseNameValuePair | back to summary |
|---|---|
| public static NameValuePair parseNameValuePair(final String value, final HeaderValueParser parser) throws ParseException Parses a name-value-pair with the given parser.
| |
| parseNameValuePair | back to summary |
|---|---|
| public NameValuePair parseNameValuePair(final CharArrayBuffer buffer, final ParserCursor cursor) Implements org. Doc from org. Parses a name=value specification, where the = and value are optional.
| |
| parseNameValuePair | back to summary |
|---|---|
| public NameValuePair parseNameValuePair(final CharArrayBuffer buffer, final ParserCursor cursor, final char[] delimiters)
Deprecated (4.4) use
| |
| parseParameters | back to summary |
|---|---|
| public static NameValuePair[] parseParameters(final String value, final HeaderValueParser parser) throws ParseException Parses parameters with the given parser.
| |
| parseParameters | back to summary |
|---|---|
| public NameValuePair[] parseParameters(final CharArrayBuffer buffer, final ParserCursor cursor) Implements org. Doc from org. Parses a list of name-value pairs.
These lists are used to specify parameters to a header element.
Parse errors are indicated as
| |