|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.org.retep.util.io.BufferedCharReader
public class BufferedCharReader
A BufferedCharReader is a reader which ensures that a certain number of characters are in an array, filling the array as required from a Reader. Unlike BufferedReader, the entire buffer is available, and is useable directly by classes like ParserUtils.
| Constructor Summary | |
|---|---|
BufferedCharReader(java.io.Reader reader)
|
|
BufferedCharReader(java.io.Reader reader,
int limit)
|
|
| Method Summary | |
|---|---|
int |
copy(char[] dest,
int length)
Copy from the buffer into a char array |
void |
ensureCapacity()
ensure we have length characters in the buffer. |
void |
ensureCapacity(int length)
ensure we have length characters in the buffer. |
void |
fill()
|
int |
getAvailable()
|
char[] |
getBuffer()
|
char |
getCurrent()
The current character |
int |
getEnd()
|
int |
getLimit()
|
int |
getPosition()
|
boolean |
isEof()
|
void |
moveForward(int p)
|
void |
reset()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BufferedCharReader(java.io.Reader reader)
public BufferedCharReader(java.io.Reader reader,
int limit)
| Method Detail |
|---|
public char[] getBuffer()
public int getPosition()
public int getEnd()
public int getLimit()
public int getAvailable()
public void reset()
public boolean isEof()
public void fill()
throws java.io.IOException
java.io.IOException
public void ensureCapacity()
throws java.io.IOException
java.io.IOException
public void ensureCapacity(int length)
throws java.io.IOException
length - The amount to ensure is in the buffer
java.io.IOException
public char getCurrent()
throws java.io.IOException
java.io.IOException
public int copy(char[] dest,
int length)
throws java.io.IOException
dest - Array to write tolength - number of characters to copy
java.io.IOException
public void moveForward(int p)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||