javax.mail.internet
Class HeaderTokenizer.Token
java.lang.Object
javax.mail.internet.HeaderTokenizer.Token
- HeaderTokenizer
public static class HeaderTokenizer.Token
extends java.lang.Object
A token returned by the lexer. These tokens are specified in RFC 822
and MIME.
Token(int type, String value) - Constructor.
|
int | getType() - Returns the token type.
|
String | getValue() - Returns the value of the token.
|
ATOM
public static final int ATOM
An ATOM.
COMMENT
public static final int COMMENT
A comment.
The value of this token is the comment string without the comment
start and end symbols.
EOF
public static final int EOF
The end of the input.
QUOTEDSTRING
public static final int QUOTEDSTRING
A quoted-string.
The value of this token is the string without the quotes.
Token
public Token(int type,
String value)
Constructor.
type
- the token typevalue
- the token value
getType
public int getType()
Returns the token type.
If the token is a delimiter or a control character,
the type is the integer value of that character.
Otherwise, its value is one of the following:
- ATOM: a sequence of ASCII characters delimited by either
SPACE, CTL, '(', '"' or the specified SPECIALS
- QUOTEDSTRING: a sequence of ASCII characters within quotes
- COMMENT: a sequence of ASCII characters within '(' and ')'
- EOF: the end of the header
getValue
public String getValue()
Returns the value of the token.
© Copyright 2003, 2004
The Free Software Foundation, All rights reserved