|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.internet.HeaderTokenizer
public class HeaderTokenizer
This class tokenizes RFC822 and MIME headers into the basic symbols specified by RFC822 and MIME.
This class handles folded headers (ie headers with embedded CRLF SPACE sequences). The folds are removed in the returned tokens.
Nested Class Summary | |
---|---|
static class |
HeaderTokenizer.Token
The Token class represents tokens returned by the HeaderTokenizer. |
Field Summary | |
---|---|
static java.lang.String |
MIME
MIME specials |
static java.lang.String |
RFC822
RFC822 specials |
Constructor Summary | |
---|---|
HeaderTokenizer(java.lang.String header)
Constructor. |
|
HeaderTokenizer(java.lang.String header,
java.lang.String delimiters)
Constructor. |
|
HeaderTokenizer(java.lang.String header,
java.lang.String delimiters,
boolean skipComments)
Constructor that takes a rfc822 style header. |
Method Summary | |
---|---|
java.lang.String |
getRemainder()
Return the rest of the Header. |
HeaderTokenizer.Token |
next()
Parses the next token from this String. |
HeaderTokenizer.Token |
peek()
Peek at the next token, without actually removing the token from the parse stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RFC822
public static final java.lang.String MIME
Constructor Detail |
---|
public HeaderTokenizer(java.lang.String header, java.lang.String delimiters, boolean skipComments)
header
- The rfc822 header to be tokenizeddelimiters
- Set of delimiter characters
to be used to delimit ATOMS. These
are usually RFC822
or
MIME
skipComments
- If true, comments are skipped and
not returned as tokenspublic HeaderTokenizer(java.lang.String header, java.lang.String delimiters)
header
- The header that is tokenizeddelimiters
- The delimiters to be usedpublic HeaderTokenizer(java.lang.String header)
Method Detail |
---|
public HeaderTokenizer.Token next() throws ParseException
Clients sit in a loop calling next() to parse successive tokens until an EOF Token is returned.
ParseException
- if the parse failspublic HeaderTokenizer.Token peek() throws ParseException
next()
is
called.
ParseException
- if the parse failspublic java.lang.String getRemainder()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41