org.apache.geronimo.javamail.store.imap.connection
Class IMAPResponseTokenizer.Token

java.lang.Object
  extended by org.apache.geronimo.javamail.store.imap.connection.IMAPResponseTokenizer.Token
Enclosing class:
IMAPResponseTokenizer

public static class IMAPResponseTokenizer.Token
extends Object


Field Summary
static int ATOM
           
static int CONTINUATION
           
static int EOF
           
static int LITERAL
           
static int NIL
           
static int NUMERIC
           
static int QUOTEDSTRING
           
static int UNTAGGED
           
 
Constructor Summary
IMAPResponseTokenizer.Token(int type, String value)
           
 
Method Summary
 int getInteger()
          Return the token as an integer value.
 long getLong()
          Return the token as a long value.
 int getType()
           
 String getValue()
           
 boolean isType(int type)
           
 String toString()
          Handy debugging toString() method for token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATOM

public static final int ATOM
See Also:
Constant Field Values

QUOTEDSTRING

public static final int QUOTEDSTRING
See Also:
Constant Field Values

LITERAL

public static final int LITERAL
See Also:
Constant Field Values

NUMERIC

public static final int NUMERIC
See Also:
Constant Field Values

EOF

public static final int EOF
See Also:
Constant Field Values

NIL

public static final int NIL
See Also:
Constant Field Values

CONTINUATION

public static final int CONTINUATION
See Also:
Constant Field Values

UNTAGGED

public static final int UNTAGGED
See Also:
Constant Field Values
Constructor Detail

IMAPResponseTokenizer.Token

public IMAPResponseTokenizer.Token(int type,
                                   String value)
Method Detail

getType

public int getType()

getValue

public String getValue()

isType

public boolean isType(int type)

getInteger

public int getInteger()
               throws MessagingException
Return the token as an integer value. If this can't convert, an exception is thrown.

Returns:
The integer value of the token.
Throws:
ResponseFormatException
MessagingException

getLong

public long getLong()
             throws MessagingException
Return the token as a long value. If it can't convert, an exception is thrown.

Returns:
The token as a long value.
Throws:
ResponseFormatException
MessagingException

toString

public String toString()
Handy debugging toString() method for token.

Overrides:
toString in class Object
Returns:
The string value of the token.


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.