All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.HttpTokenList

java.lang.Object
   |
   +----w3c.www.http.BasicValue
           |
           +----w3c.www.http.HttpTokenList

public class HttpTokenList
extends BasicValue
Parse a comma separated list of tokens.


Variable Index

 o CASE_ASIS
Don't touch cases of tokens.
 o CASE_LOWER
Convert tokens to lower case.
 o CASE_UPPER
Convert case to upper case.
 o casemode
 o tokens

Constructor Index

 o HttpTokenList()
Create an empty token list for parsing.
 o HttpTokenList(String)
Create a token list from a comma separated list of tokens.
 o HttpTokenList(String[])
Create a parsed token list, for emitting.

Method Index

 o addToken(String, boolean)
Add a token to this token list.
 o getValue()
Get this token list value.
 o hasToken(String, boolean)
Does this token list includes that token ?
 o parse()
Parse the byte buffer to build the token list.
 o setValue(String[])
 o updateByteValue()
Update the RFC822 compatible header value for this object.

Variables

 o CASE_LOWER
 protected static final int CASE_LOWER
Convert tokens to lower case.

 o CASE_ASIS
 protected static final int CASE_ASIS
Don't touch cases of tokens.

 o CASE_UPPER
 protected static final int CASE_UPPER
Convert case to upper case.

 o tokens
 protected String tokens[]
 o casemode
 protected int casemode

Constructors

 o HttpTokenList
 protected HttpTokenList(String tokens[])
Create a parsed token list, for emitting.

 o HttpTokenList
 protected HttpTokenList(String tokens)
Create a token list from a comma separated list of tokens.

 o HttpTokenList
 protected HttpTokenList()
Create an empty token list for parsing.

Methods

 o parse
 protected void parse()
Parse the byte buffer to build the token list.

Overrides:
parse in class BasicValue
 o updateByteValue
 protected void updateByteValue()
Update the RFC822 compatible header value for this object.

Overrides:
updateByteValue in class BasicValue
 o getValue
 public Object getValue()
Get this token list value.

Returns:
A list of tokens, encoded as a String array, or null if undefined.
Overrides:
getValue in class BasicValue
 o setValue
 public void setValue(String tokens[])
 o addToken
 public void addToken(String token,
                      boolean always)
Add a token to this token list.

Parameters:
token - The token to add.
always - Always add to the list, even if the token us already present in the list.
 o hasToken
 public boolean hasToken(String token,
                         boolean caseSensitive)
Does this token list includes that token ?

Parameters:
token - The token to look for.
Returns:
A boolean, true if found, false otherwise.

All Packages  Class Hierarchy  This Package  Previous  Next  Index