org.apache.abdera.util.io
Class RestrictedCodepointIterator
java.lang.Object
org.apache.abdera.util.io.CodepointIterator
org.apache.abdera.util.io.FilterCodepointIterator
org.apache.abdera.util.io.RestrictedCodepointIterator
public class RestrictedCodepointIterator
- extends FilterCodepointIterator
A CodepointIterator implementation that checks output against a BitSet.
If the iterator is set to "scanning only", the iterator will return -1
upon encountering a codepoint not in the set, otherwise the iterator
will throw an InvalidCharacterException
Methods inherited from class org.apache.abdera.util.io.FilterCodepointIterator |
get, get, isHigh, isLow, limit, peek, peek, peekChars, position, position, remaining |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RestrictedCodepointIterator
protected RestrictedCodepointIterator(CodepointIterator internal,
java.util.BitSet bitset)
RestrictedCodepointIterator
protected RestrictedCodepointIterator(CodepointIterator internal,
java.util.BitSet bitset,
boolean scanningOnly)
RestrictedCodepointIterator
protected RestrictedCodepointIterator(CodepointIterator internal,
java.util.BitSet bitset,
boolean scanningOnly,
boolean notset)
hasNext
public boolean hasNext()
- Overrides:
hasNext
in class FilterCodepointIterator
next
public int next()
throws InvalidCharacterException
- Overrides:
next
in class FilterCodepointIterator
- Throws:
InvalidCharacterException
nextChars
public char[] nextChars()
throws InvalidCharacterException
- Overrides:
nextChars
in class FilterCodepointIterator
- Throws:
InvalidCharacterException
main
public static void main(java.lang.String... args)
throws java.lang.Exception
- Throws:
java.lang.Exception