org.apache.regexp
Class ReaderCharacterIterator
java.lang.Object
org.apache.regexp.ReaderCharacterIterator
- CharacterIterator
public final class ReaderCharacterIterator
extends java.lang.Object
Encapsulates java.io.Reader as CharacterIterator
CVS $Id: ReaderCharacterIterator.java 126148 2004-02-17 13:37:54Z vgritsenko $private StringBuffer | buff - Buffer of read chars
|
private boolean | closed - read end?
|
private Reader | reader - Underlying reader
|
char | charAt(int pos)
|
private void | ensure(int idx) - Reads chars up to the idx
|
boolean | isEnd(int pos)
|
private int | read(int n) - Reads n characters from the stream and appends them to the buffer
|
private void | readAll() - Reads rest of the stream.
|
String | substring(int beginIndex)
|
String | substring(int beginIndex, int endIndex)
|
buff
private final StringBuffer buff
Buffer of read chars
closed
private boolean closed
read end?
reader
private final Reader reader
Underlying reader
ReaderCharacterIterator
public ReaderCharacterIterator(Reader reader)
reader
- a Reader, which is parsed
ensure
private void ensure(int idx)
throws IOException
Reads chars up to the idx
isEnd
public boolean isEnd(int pos)
- isEnd in interface CharacterIterator
- true iff if the specified index is after the end of the character stream
read
private int read(int n)
throws IOException
Reads n characters from the stream and appends them to the buffer
readAll
private void readAll()
throws IOException
Reads rest of the stream.
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.