Top Constructors Methods
org.apache.tomcat.util.http.parser

public Class TokenList

extends Object
Class Inheritance
Imports
java.io.IOException, .Reader, .StringReader, java.util.Collection, .Enumeration, .Locale

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if the header values were parsed cleanly and at least one token was found, otherwise false (e.g. if a non-token value was encountered)
parseTokenList
(Enumeration<String>
The headers to parse
inputs
,
Collection<String>
The Collection (usually a list or a set) to which the parsed tokens should be added
collection
)

Parses an enumeration of header values of the form 1#token, forcing all parsed values to lower case.

public static boolean

Returns:

true if the header values were parsed cleanly and at least one token was found, otherwise false (e.g. if a non-token value was encountered)
parseTokenList
(Reader
The header to parse
input
,
Collection<String>
The Collection (usually a list or a set) to which the parsed tokens should be added
collection
)

Parses a header of the form 1#token, forcing all parsed values to lower case.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TokenListback to summary
private TokenList()

Method Detail

parseTokenListback to summary
public static boolean parseTokenList(Enumeration<String> inputs, Collection<String> collection) throws IOException

Parses an enumeration of header values of the form 1#token, forcing all parsed values to lower case.

Parameters
inputs:Enumeration<String>

The headers to parse

collection:Collection<String>

The Collection (usually a list or a set) to which the parsed tokens should be added

Returns:boolean

true if the header values were parsed cleanly and at least one token was found, otherwise false (e.g. if a non-token value was encountered)

Exceptions
IOException:
If an I/O error occurs reading the header
parseTokenListback to summary
public static boolean parseTokenList(Reader input, Collection<String> collection) throws IOException

Parses a header of the form 1#token, forcing all parsed values to lower case.

Parameters
input:Reader

The header to parse

collection:Collection<String>

The Collection (usually a list or a set) to which the parsed tokens should be added

Returns:boolean

true if the header values were parsed cleanly and at least one token was found, otherwise false (e.g. if a non-token value was encountered)

Exceptions
IOException:
If an I/O error occurs reading the header