|
Java EE 5 SDK | ||||||||
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 String |
MIME
MIME specials |
static String |
RFC822
RFC822 specials |
Constructor Summary | |
---|---|
HeaderTokenizer(String header)
Constructor. |
|
HeaderTokenizer(String header,
String delimiters)
Constructor. |
|
HeaderTokenizer(String header,
String delimiters,
boolean skipComments)
Constructor that takes a rfc822 style header. |
Method Summary | |
---|---|
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 String RFC822
public static final String MIME
Constructor Detail |
---|
public HeaderTokenizer(String header, 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(String header, String delimiters)
header
- The header that is tokenizeddelimiters
- The delimiters to be usedpublic HeaderTokenizer(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 String getRemainder()
|
Java EE 5 SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2006 Sun Microsystems, Inc. All rights reserved.