class HeaderTokenizer extends Object
This class handles folded headers (ie headers with embedded CRLF SPACE sequences). The folds are removed in the returned tokens.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
HeaderTokenizer.Token
The Token class represents tokens returned by the
HeaderTokenizer.
|
Modifier and Type | Field and Description |
---|---|
(package private) static String |
MIME
MIME specials
|
Constructor and Description |
---|
HeaderTokenizer(String header)
Constructor.
|
HeaderTokenizer(String header,
String delimiters)
Constructor.
|
HeaderTokenizer(String header,
String delimiters,
boolean skipComments)
Constructor that takes a rfc822 style header.
|
Modifier and Type | Method and Description |
---|---|
(package private) String |
getRemainder()
Return the rest of the Header.
|
(package private) HeaderTokenizer.Token |
next()
Parses the next token from this String.
|
(package private) HeaderTokenizer.Token |
peek()
Peek at the next token, without actually removing the token
from the parse stream.
|
static final String MIME
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 tokensHeaderTokenizer(String header, String delimiters)
header
- The header that is tokenizeddelimiters
- The delimiters to be usedHeaderTokenizer(String header)
HeaderTokenizer.Token next() throws WebServiceException
Clients sit in a loop calling next() to parse successive tokens until an EOF Token is returned.
WebServiceException
- if the parse failsHeaderTokenizer.Token peek() throws WebServiceException
next()
is
called. WebServiceException
- if the parse failsString getRemainder()
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.