org.apache.regexp
Class StreamCharacterIterator
java.lang.Object
org.apache.regexp.StreamCharacterIterator
- CharacterIterator
public final class StreamCharacterIterator
extends java.lang.Object
Encapsulates java.io.InputStream as CharacterIterator.
CVS $Id: StreamCharacterIterator.java 126148 2004-02-17 13:37:54Z vgritsenko $private StringBuffer | buff - Buffer of read chars
|
private boolean | closed - read end?
|
private InputStream | is - Underlying is
|
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?
is
private final InputStream is
Underlying is
StreamCharacterIterator
public StreamCharacterIterator(InputStream is)
is
- an InputStream, 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.