Package org.eclipse.jetty.http
Class QuotedCSV
java.lang.Object
org.eclipse.jetty.http.QuotedCSVParser
org.eclipse.jetty.http.QuotedCSV
- Direct Known Subclasses:
QuotedCSV.Compliant,QuotedQualityCSV
Implements a quoted comma-separated list of values
in accordance with RFC9110 section 5.5
and RFC9110 section 5.6.
OWS is removed and quoted characters ignored for parsing.
- See Also:
-
- "https://datatracker.ietf.org/doc/html/rfc9110#section-5.5"
- "https://datatracker.ietf.org/doc/html/rfc9110#section-5.6"
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.static class -
Field Summary
Fields inherited from class org.eclipse.jetty.http.QuotedCSVParser
_keepQuotes, DELIMITERS, LIST_TOKENIZER -
Constructor Summary
ConstructorsConstructorDescriptionQuotedCSV(ComplianceViolation.Mode compliance, ComplianceViolation.Listener listener, boolean keepQuotes, String... values) -
Method Summary
Modifier and TypeMethodDescriptionasString()booleanisEmpty()iterator()static StringJoin a list into Quoted CSV stringstatic voidjoin(StringBuilder builder, List<String> values) Join a list into Quoted CSV StringBuilderstatic StringJoin a list into Quoted CSV stringprotected voidonComplianceViolation(ComplianceViolation violation, String value) 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 voidparsedValueAndParams(StringBuilder buffer) Called when a value and it's parameters has been parsedintsize()toString()Methods inherited from class org.eclipse.jetty.http.QuotedCSVParser
addValue, onComplianceViolation, openingQuoteInValue, parsedValue, quote, quoteIfNeeded, unquoteMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
QuotedCSV
-
QuotedCSV
-
QuotedCSV
public QuotedCSV(ComplianceViolation.Mode compliance, ComplianceViolation.Listener listener, boolean keepQuotes, String... values)
-
-
Method Details
-
join
Join a list into Quoted CSV string- Parameters:
values- A list of values- Returns:
- A Quoted Comma Separated Value list
-
join
Join a list into Quoted CSV string- Parameters:
values- A list of values- Returns:
- A Quoted Comma Separated Value list
-
join
Join a list into Quoted CSV StringBuilder- Parameters:
builder- A builder to join the list intovalues- A list of values
-
parsedValueAndParams
Description copied from class:QuotedCSVParserCalled when a value and it's parameters has been parsed- Overrides:
parsedValueAndParamsin classQuotedCSVParser- Parameters:
buffer- Containing the trimmed value and parameters
-
parsedParam
Description copied from class:QuotedCSVParserCalled when a parameter has been parsed- Overrides:
parsedParamin classQuotedCSVParser- 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
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getValues
-
getMutableValues
-
iterator
-
onComplianceViolation
Description copied from class:QuotedCSVParserCalled when a parameter has been parsed with bad white space- Overrides:
onComplianceViolationin classQuotedCSVParser
-
asString
-
toString
-
QuotedCSVinstead