- java.lang.Object
-
- javax.mail.internet.HeaderTokenizer.Token
-
- Enclosing class:
- HeaderTokenizer
public static class HeaderTokenizer.Token extends Object
The Token class represents tokens returned by the HeaderTokenizer.
-
-
Field Summary
Fields Modifier and Type Field and Description 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
Constructors Constructor and Description Token(int type, String value)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getType()
Return the type of the token.String
getValue()
Returns the value of the token just read.
-
-
-
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
-
Token
public Token(int type, String value)
Constructor.- Parameters:
type
- Token typevalue
- Token value
-
-
Method Detail
-
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
-
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
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/mail/internet/headertokenizer.token.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.