javax.mail.internet

Class HeaderTokenizer.Token

public static class HeaderTokenizer.Token extends Object

A token returned by the lexer. These tokens are specified in RFC 822 and MIME.
Field Summary
static intATOM
An ATOM.
static intCOMMENT
A comment.
static intEOF
The end of the input.
static intQUOTEDSTRING
A quoted-string.
Constructor Summary
Token(int type, String value)
Constructor.
Method Summary
intgetType()
Returns the token type.
StringgetValue()
Returns the value of the token.

Field Detail

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.

Constructor Detail

Token

public Token(int type, String value)
Constructor.

Parameters: type the token type value the token value

Method Detail

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:

getValue

public String getValue()
Returns the value of the token.
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved