- java.lang.Object
- 
- jakarta.mail.internet.HeaderTokenizer.Token
 
- 
- Enclosing class:
- HeaderTokenizer
 
 public static class HeaderTokenizer.Token extends java.lang.ObjectThe Token class represents tokens returned by the HeaderTokenizer.
- 
- 
Field SummaryFields Modifier and Type Field Description static intATOMToken type indicating an ATOM.static intCOMMENTToken type indicating a comment.static intEOFToken type indicating end of input.static intQUOTEDSTRINGToken type indicating a quoted string.
 - 
Constructor SummaryConstructors Constructor Description Token(int type, java.lang.String value)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetType()Return the type of the token.java.lang.StringgetValue()Returns the value of the token just read.
 
- 
- 
- 
Field Detail- 
ATOMpublic static final int ATOM Token type indicating an ATOM.- See Also:
- Constant Field Values
 
 - 
QUOTEDSTRINGpublic static final int QUOTEDSTRING Token type indicating a quoted string. The value field contains the string without the quotes.- See Also:
- Constant Field Values
 
 - 
COMMENTpublic static final int COMMENT Token type indicating a comment. The value field contains the comment string without the comment start and end symbols.- See Also:
- Constant Field Values
 
 - 
EOFpublic static final int EOF Token type indicating end of input.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getTypepublic int getType() Return the type of the token. If the token represents a delimiter or a control character, the type is that character itself, converted to an integer. Otherwise, it's value is one of the following:- ATOMA sequence of ASCII characters delimited by either SPACE, CTL, "(", <"> or the specified SPECIALS
- QUOTEDSTRINGA sequence of ASCII characters within quotes
- COMMENTA sequence of ASCII characters within "(" and ")".
- EOFEnd of header
 - Returns:
- the token type
 
 - 
getValuepublic java.lang.String getValue() Returns the value of the token just read. When the current token is a quoted string, this field contains the body of the string, without the quotes. When the current token is a comment, this field contains the body of the comment.- Returns:
- token value
 
 
- 
 
-