javax.mail.internet

Class HeaderTokenizer.Token

  • Enclosing class:
    HeaderTokenizer

    public static class HeaderTokenizer.Token
    extends Object
    The Token class represents tokens returned by the HeaderTokenizer.
    • Field Detail

      • 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
    • Constructor Detail

      • Token

        public Token(int type,
                     String value)
        Constructor.
        Parameters:
        type - Token type
        value - 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 SPECIALS
        • QUOTEDSTRING A sequence of ASCII characters within quotes
        • COMMENT 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

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/mail/internet/headertokenizer.token.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.