public class BasicTokenIterator extends Object implements TokenIterator
TokenIterator.
This implementation parses #token sequences as
defined by RFC 2616, section 2.
It extends that definition somewhat beyond US-ASCII.| Modifier and Type | Field and Description |
|---|---|
static String |
HTTP_SEPARATORS
The HTTP separator characters.
|
| Constructor and Description |
|---|
BasicTokenIterator(HeaderIterator headerIterator)
Creates a new instance of
BasicTokenIterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Indicates whether there is another token in this iteration.
|
Object |
next()
Returns the next token.
|
String |
nextToken()
Obtains the next token from this iteration.
|
void |
remove()
Removing tokens is not supported.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic static final String HTTP_SEPARATORS
public BasicTokenIterator(HeaderIterator headerIterator)
BasicTokenIterator.headerIterator - the iterator for the headers to tokenizepublic boolean hasNext()
TokenIteratorhasNext in interface Iterator<Object>hasNext in interface TokenIteratortrue if there is another token,
false otherwisepublic String nextToken() throws NoSuchElementException, ParseException
nextToken in interface TokenIteratorNoSuchElementException - if the iteration is already overParseException - if an invalid header value is encounteredpublic final Object next() throws NoSuchElementException, ParseException
nextToken(), but with generic return type.next in interface Iterator<Object>NoSuchElementException - if there are no more tokensParseException - if an invalid header value is encounteredpublic final void remove()
throws UnsupportedOperationException
remove in interface Iterator<Object>UnsupportedOperationException - alwaysCopyright © 2010 - 2020 Adobe. All Rights Reserved