Package org.eclipse.jetty.http
Class QuotedCSVParser
- java.lang.Object
-
- org.eclipse.jetty.http.QuotedCSVParser
-
- Direct Known Subclasses:
QuotedCSV
public abstract class QuotedCSVParser extends java.lang.Object
Implements a quoted comma separated list parser in accordance with RFC7230. OWS is removed and quoted characters ignored for parsing.- See Also:
- "https://tools.ietf.org/html/rfc7230#section-3.2.6", "https://tools.ietf.org/html/rfc7230#section-7"
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_keepQuotes
-
Constructor Summary
Constructors Constructor Description QuotedCSVParser(boolean keepQuotes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(java.lang.String value)
Add and parse a value string(s)protected void
parsedParam(java.lang.StringBuffer buffer, int valueLength, int paramName, int paramValue)
Called when a parameter has been parsedprotected void
parsedValue(java.lang.StringBuffer buffer)
Called when a value has been parsed (prior to any parameters)protected void
parsedValueAndParams(java.lang.StringBuffer buffer)
Called when a value and it's parameters has been parsedstatic java.lang.String
unquote(java.lang.String s)
-
-
-
Method Detail
-
unquote
public static java.lang.String unquote(java.lang.String s)
-
addValue
public void addValue(java.lang.String value)
Add and parse a value string(s)- Parameters:
value
- A value that may contain one or more Quoted CSV items.
-
parsedValueAndParams
protected void parsedValueAndParams(java.lang.StringBuffer buffer)
Called when a value and it's parameters has been parsed- Parameters:
buffer
- Containing the trimmed value and parameters
-
parsedValue
protected void parsedValue(java.lang.StringBuffer buffer)
Called when a value has been parsed (prior to any parameters)- Parameters:
buffer
- Containing the trimmed value, which may be mutated
-
parsedParam
protected void parsedParam(java.lang.StringBuffer buffer, int valueLength, int paramName, int paramValue)
Called when a parameter has been parsed- Parameters:
buffer
- Containing the trimmed value and all parameters, which may be mutatedvalueLength
- The length of the valueparamName
- The index of the start of the parameter just parsedparamValue
- The index of the start of the parameter value just parsed, or -1
-
-