org.apache.abdera.util.io
Class CodepointIterator

java.lang.Object
  extended by org.apache.abdera.util.io.CodepointIterator
Direct Known Subclasses:
CharArrayCodepointIterator, CharSequenceCodepointIterator, FilterCodepointIterator

public abstract class CodepointIterator
extends java.lang.Object

Iterate over Unicode codepoints


Field Summary
protected  int limit
           
protected  int position
           
 
Constructor Summary
CodepointIterator()
           
 
Method Summary
static CodepointIterator forByteArray(byte[] array)
           
static CodepointIterator forCharArray(char[] array)
           
static CodepointIterator forCharBuffer(java.nio.CharBuffer buffer)
           
static CodepointIterator forCharSequence(java.lang.CharSequence seq)
           
protected abstract  char get()
           
protected abstract  char get(int index)
           
 boolean hasNext()
           
 boolean isHigh(int index)
           
 boolean isLow(int index)
           
 int last()
           
 int lastPosition()
           
 int limit()
           
 int next()
           
 char[] nextChars()
           
 int peek()
           
 int peek(int index)
           
 char[] peekChars()
           
 int position()
           
 void position(int n)
           
 int remaining()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected int position

limit

protected int limit
Constructor Detail

CodepointIterator

public CodepointIterator()
Method Detail

forCharArray

public static CodepointIterator forCharArray(char[] array)

forCharSequence

public static CodepointIterator forCharSequence(java.lang.CharSequence seq)

forByteArray

public static CodepointIterator forByteArray(byte[] array)

forCharBuffer

public static CodepointIterator forCharBuffer(java.nio.CharBuffer buffer)

get

protected abstract char get()

get

protected abstract char get(int index)

hasNext

public boolean hasNext()

last

public int last()

lastPosition

public int lastPosition()

nextChars

public char[] nextChars()
                 throws InvalidCharacterException
Throws:
InvalidCharacterException

peekChars

public char[] peekChars()
                 throws InvalidCharacterException
Throws:
InvalidCharacterException

next

public int next()
         throws InvalidCharacterException
Throws:
InvalidCharacterException

peek

public int peek()
         throws InvalidCharacterException
Throws:
InvalidCharacterException

peek

public int peek(int index)
         throws InvalidCharacterException
Throws:
InvalidCharacterException

position

public void position(int n)

position

public int position()

limit

public int limit()

remaining

public int remaining()

isHigh

public boolean isHigh(int index)

isLow

public boolean isLow(int index)