Top Description Fields Constructors Methods
org.eclipse.jetty.http

public Class QuotedCSV

extends QuotedCSVParser
implements Iterable<String>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Known Direct Subclasses
org.eclipse.jetty.http.QuotedQualityCSV
Imports
java.util.ArrayList, .Arrays, .Iterator, .List

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

Modifier and TypeField and Description
protected final List<String>
Inherited from org.eclipse.jetty.http.QuotedCSVParser:
_keepQuotesDELIMITERSLIST_TOKENIZER

Constructor Summary

AccessConstructor and Description
public
QuotedCSV(String... values)

public
QuotedCSV(boolean keepQuotes, String... values)

Method Summary

Modifier and TypeMethod and Description
public List<String>
public boolean
public Iterator<String>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
public static String

Returns:

A Quoted Comma Separated Value list
join
(List<String>
A list of values
values
)

Join a list into Quoted CSV string

public static String

Returns:

A Quoted Comma Separated Value list
join
(String...
A list of values
values
)

Join a list into Quoted CSV string

public static void
join(StringBuilder
A builder to join the list into
builder
,
List<String>
A list of values
values
)

Join a list into Quoted CSV StringBuilder

protected void
parsedValueAndParams(StringBuffer
Containing the trimmed value and parameters
buffer
)

Overrides org.eclipse.jetty.http.QuotedCSVParser.parsedValueAndParams.

Called when a value and it's parameters has been parsed
public int
size()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.eclipse.jetty.http.QuotedCSVParser:
addValueparsedParamparsedValuequotequoteIfNeededunquote

Field Detail

_valuesback to summary
protected final List<String> _values

Constructor Detail

QuotedCSVback to summary
public QuotedCSV(String... values)
QuotedCSVback to summary
public QuotedCSV(boolean keepQuotes, String... values)

Method Detail

getValuesback to summary
public List<String> getValues()
isEmptyback to summary
public boolean isEmpty()
iteratorback to summary
public Iterator<String> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<String>

an Iterator.

Annotations
@Override
joinback to summary
public static String join(List<String> values)

Join a list into Quoted CSV string

Parameters
values:List<String>

A list of values

Returns:String

A Quoted Comma Separated Value list

joinback to summary
public static String join(String... values)

Join a list into Quoted CSV string

Parameters
values:String[]

A list of values

Returns:String

A Quoted Comma Separated Value list

joinback to summary
public static void join(StringBuilder builder, List<String> values)

Join a list into Quoted CSV StringBuilder

Parameters
builder:StringBuilder

A builder to join the list into

values:List<String>

A list of values

parsedValueAndParamsback to summary
protected void parsedValueAndParams(StringBuffer buffer)

Overrides org.eclipse.jetty.http.QuotedCSVParser.parsedValueAndParams.

Doc from org.eclipse.jetty.http.QuotedCSVParser.parsedValueAndParams.

Called when a value and it's parameters has been parsed

Parameters
buffer:StringBuffer

Containing the trimmed value and parameters

Annotations
@Override
sizeback to summary
public int size()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override