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

public abstract Class QuotedCSVParser

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.jetty.http.QuotedCSV
Imports
org.eclipse.jetty.util.QuotedStringTokenizer

Implements a quoted comma separated list parser in accordance with RFC9110 section 5.6. OWS is removed and quoted characters ignored for parsing.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
protected final boolean
public static final String
public static final QuotedStringTokenizer

Constructor Summary

AccessConstructor and Description
public
QuotedCSVParser(boolean keepQuotes)

Method Summary

Modifier and TypeMethod and Description
public void
addValue(String
A value that may contain one or more Quoted CSV items.
value
)

Add and parse a value string(s)

protected void
parsedParam(StringBuffer
Containing the trimmed value and all parameters, which may be mutated
buffer
,
int
The length of the value
valueLength
,
int
The index of the start of the parameter just parsed
paramName
,
int
The index of the start of the parameter value just parsed, or -1
paramValue
)

Called when a parameter has been parsed

protected void
parsedValue(StringBuffer
Containing the trimmed value, which may be mutated
buffer
)

Called when a value has been parsed (prior to any parameters)

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

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

public static String
public static String
public static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_keepQuotesback to summary
protected final boolean _keepQuotes
DELIMITERSback to summary
public static final String DELIMITERS
LIST_TOKENIZERback to summary
public static final QuotedStringTokenizer LIST_TOKENIZER

Constructor Detail

QuotedCSVParserback to summary
public QuotedCSVParser(boolean keepQuotes)

Method Detail

addValueback to summary
public void addValue(String value)

Add and parse a value string(s)

Parameters
value:String

A value that may contain one or more Quoted CSV items.

parsedParamback to summary
protected void parsedParam(StringBuffer buffer, int valueLength, int paramName, int paramValue)

Called when a parameter has been parsed

Parameters
buffer:StringBuffer

Containing the trimmed value and all parameters, which may be mutated

valueLength:int

The length of the value

paramName:int

The index of the start of the parameter just parsed

paramValue:int

The index of the start of the parameter value just parsed, or -1

parsedValueback to summary
protected void parsedValue(StringBuffer buffer)

Called when a value has been parsed (prior to any parameters)

Parameters
buffer:StringBuffer

Containing the trimmed value, which may be mutated

parsedValueAndParamsback to summary
protected void parsedValueAndParams(StringBuffer buffer)

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

Parameters
buffer:StringBuffer

Containing the trimmed value and parameters

quoteback to summary
public static String quote(String s)
quoteIfNeededback to summary
public static String quoteIfNeeded(String s)
unquoteback to summary
public static String unquote(String s)
org.eclipse.jetty.http back to summary

private final Enum QuotedCSVParser.State

extends Enum<QuotedCSVParser.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final QuotedCSVParser.State
public static final QuotedCSVParser.State
public static final QuotedCSVParser.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static QuotedCSVParser.State
public static QuotedCSVParser.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PARAM_NAMEback to summary
public static final QuotedCSVParser.State PARAM_NAME
PARAM_VALUEback to summary
public static final QuotedCSVParser.State PARAM_VALUE
VALUEback to summary
public static final QuotedCSVParser.State VALUE

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static QuotedCSVParser.State valueOf(String name)
valuesback to summary
public static QuotedCSVParser.State[] values()