javax.mail.internet
Class HeaderTokenizer.Token

java.lang.Object
  extended by javax.mail.internet.HeaderTokenizer.Token
Enclosing class:
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.


Field Summary
static int ATOM
          An ATOM.
static int COMMENT
          A comment.
static int EOF
          The end of the input.
static int QUOTEDSTRING
          A quoted-string.
 
Constructor Summary
HeaderTokenizer.Token(int type, java.lang.String value)
          Constructor.
 
Method Summary
 int getType()
          Returns the token type.
 java.lang.String getValue()
          Returns the value of the token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATOM

public static final int ATOM
An ATOM.

See Also:
Constant Field Values

QUOTEDSTRING

public static final int QUOTEDSTRING
A quoted-string. The value of this token is the string without the quotes.

See Also:
Constant Field Values

COMMENT

public static final int COMMENT
A comment. The value of this token is the comment string without the comment start and end symbols.

See Also:
Constant Field Values

EOF

public static final int EOF
The end of the input.

See Also:
Constant Field Values
Constructor Detail

HeaderTokenizer.Token

public HeaderTokenizer.Token(int type,
                             java.lang.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 java.lang.String getValue()
Returns the value of the token.