@Contract(threading=IMMUTABLE) public class BasicHeaderValueParser extends Object implements HeaderValueParser
HeaderValueParser
implementation.Modifier and Type | Field and Description |
---|---|
static BasicHeaderValueParser |
INSTANCE |
Constructor and Description |
---|
BasicHeaderValueParser() |
Modifier and Type | Method and Description |
---|---|
HeaderElement[] |
parseElements(CharSequence buffer,
ParserCursor cursor)
Parses a header value into elements.
|
HeaderElement |
parseHeaderElement(CharSequence buffer,
ParserCursor cursor)
Parses a single header element.
|
NameValuePair |
parseNameValuePair(CharSequence buffer,
ParserCursor cursor)
Parses a name=value specification, where the = and value are optional.
|
NameValuePair[] |
parseParameters(CharSequence buffer,
ParserCursor cursor)
Parses a list of name-value pairs.
|
public static final BasicHeaderValueParser INSTANCE
public HeaderElement[] parseElements(CharSequence buffer, ParserCursor cursor)
HeaderValueParser
RuntimeException
.parseElements
in interface HeaderValueParser
buffer
- buffer holding the header value to parsecursor
- the parser cursor containing the current position and
the bounds within the buffer for the parsing operationpublic HeaderElement parseHeaderElement(CharSequence buffer, ParserCursor cursor)
HeaderValueParser
parseHeaderElement
in interface HeaderValueParser
buffer
- buffer holding the element to parsecursor
- the parser cursor containing the current position and
the bounds within the buffer for the parsing operationpublic NameValuePair[] parseParameters(CharSequence buffer, ParserCursor cursor)
HeaderValueParser
ParseException
.parseParameters
in interface HeaderValueParser
buffer
- buffer holding the name-value list to parsecursor
- the parser cursor containing the current position and
the bounds within the buffer for the parsing operationpublic NameValuePair parseNameValuePair(CharSequence buffer, ParserCursor cursor)
HeaderValueParser
parseNameValuePair
in interface HeaderValueParser
buffer
- the buffer holding the name-value pair to parsecursor
- the parser cursor containing the current position and
the bounds within the buffer for the parsing operationnull
if no value is specifiedCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.