Package org.eclipse.jetty.http
Class QuotedCSV
- java.lang.Object
-
- org.eclipse.jetty.http.QuotedCSV
-
- Direct Known Subclasses:
QuotedQualityCSV
public class QuotedCSV extends Object implements Iterable<String>
Implements a quoted comma separated list of values 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_keepQuotesprotected List<String>_values
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(String value)Add and parse a value string(s)List<String>getValues()booleanisEmpty()Iterator<String>iterator()protected voidparsedParam(StringBuffer buffer, int valueLength, int paramName, int paramValue)Called when a parameter has been parsedprotected voidparsedValue(StringBuffer buffer)Called when a value has been parsedintsize()StringtoString()static Stringunquote(String s)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
addValue
public void addValue(String value)
Add and parse a value string(s)- Parameters:
value- A value that may contain one or more Quoted CSV items.
-
parsedValue
protected void parsedValue(StringBuffer buffer)
Called when a value has been parsed- Parameters:
buffer- Containing the trimmed value, which may be mutated
-
parsedParam
protected void parsedParam(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
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
-