Class QuotedCSVParser
java.lang.Object
org.eclipse.jetty.http.QuotedCSVParser
- Direct Known Subclasses:
 QuotedCSV
Implements a quoted comma-separated list parser
in accordance with RFC9110 section 5.5
and RFC9110 section 5.6.
OWS is removed and quoted characters ignored for parsing.
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanstatic final Stringstatic final QuotedStringTokenizer - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidAdd and parse a value string(s)protected voidonComplianceViolation(ComplianceViolation violation) Called when a parameter has been parsed with bad white spaceprotected voidparsedParam(StringBuilder buffer, int valueLength, int paramName, int paramValue) Called when a parameter has been parsedprotected voidparsedValue(StringBuilder buffer) Called when a value has been parsed (prior to any parameters)protected voidparsedValueAndParams(StringBuilder buffer) Called when a value and it's parameters has been parsedstatic Stringstatic Stringstatic String 
- 
Field Details
- 
DELIMITERS
- See Also:
 
 - 
LIST_TOKENIZER
 - 
_keepQuotes
protected final boolean _keepQuotes 
 - 
 - 
Constructor Details
- 
QuotedCSVParser
public QuotedCSVParser(boolean keepQuotes)  
 - 
 - 
Method Details
- 
quote
 - 
quoteIfNeeded
 - 
unquote
 - 
addValue
Add and parse a value string(s)- Parameters:
 value- A value that may contain one or more Quoted CSV items.
 - 
parsedValueAndParams
Called when a value and it's parameters has been parsed- Parameters:
 buffer- Containing the trimmed value and parameters
 - 
parsedValue
Called when a value has been parsed (prior to any parameters)- Parameters:
 buffer- Containing the trimmed value, which may be mutated
 - 
parsedParam
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
 - 
onComplianceViolation
Called when a parameter has been parsed with bad white space 
 -