|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.mail.internet Class HeaderTokenizer.Token
java.lang.Object javax.mail.internet.HeaderTokenizer.Token
- Enclosing class:
- HeaderTokenizer
public static class HeaderTokenizer.Token
- extends Object
Contained within:
HeaderTokenizer
Token 类表示 HeaderTokenizer 返回的标记。
The Token class represents tokens returned by the HeaderTokenizer.
Field Summary | |
---|---|
static int |
ATOM
Token type indicating an ATOM. |
static int |
COMMENT
Token type indicating a comment. |
static int |
EOF
Token type indicating end of input. |
static int |
QUOTEDSTRING
Token type indicating a quoted string. |
Constructor Summary | |
---|---|
HeaderTokenizer.Token(int type,
String value)
Constructor. |
Method Summary | |
---|---|
int |
getType()
Return the type of the token. |
String |
getValue()
Returns the value of the token just read. |
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
- Token type indicating an ATOM.
- See Also:
- Constant Field Values
英文文档:
QUOTEDSTRING
public static final int QUOTEDSTRING
- Token type indicating a quoted string. The value
field contains the string without the quotes.
- See Also:
- Constant Field Values
英文文档:
COMMENT
public 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
英文文档:
EOF
public static final int EOF
- Token type indicating end of input.
- See Also:
- Constant Field Values
Constructor Detail |
---|
public
HeaderTokenizer.Token(int type, String value)
构造方法。
type | Token 类型 |
value | Token 值 |
HeaderTokenizer.Token
public HeaderTokenizer.Token(int type, String value)
- Constructor.
- Parameters:
type
- Token typevalue
- Token value
Method Detail |
---|
public int
getType()
返回标记的类型。如果标记表示分界符或控制字符,则类型是该字符本身,并转换为整数。否则,其值是下列值之一:
ATOM
ASCII 字符序列,由空格、CTL、"("、<"> 或指定的特殊字符分隔
QUOTEDSTRING
包含在引号内的 ASCII 字符序列
COMMENT
包含在 "(" 和 ")" 内的 ASCII 字符序列
EOF
头的末尾
英文文档:
ATOM
ASCII 字符序列,由空格、CTL、"("、<"> 或指定的特殊字符分隔
QUOTEDSTRING
包含在引号内的 ASCII 字符序列
COMMENT
包含在 "(" 和 ")" 内的 ASCII 字符序列
EOF
头的末尾
getType
public 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:
ATOM
A sequence of ASCII characters delimited by either SPACE, CTL, "(", <"> or the specified SPECIALSQUOTEDSTRING
A sequence of ASCII characters within quotesCOMMENT
A sequence of ASCII characters within "(" and ")".EOF
End of header
public String
getValue()
返回刚刚读取的标记值。当前标记是一个带引号的字符串时,此字段将包含该字符串的正文,不带引号。当前标记是一个注释时,此字段将包含该注释的正文。
return | 标记值 |
getValue
public 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!