|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.Reader
info.aduna.io.PushbackReader
public class PushbackReader
A character-stream reader that allows characters, strings and even the contents of streams and readers to be pushed back into the stream. This class resembles java.io.PushbackReader but its pushback buffer has 'infinite' room for more characters.
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
PushbackReader()
Creates a new PushbackReader. |
|
PushbackReader(Reader r)
Creates a new PushbackReader. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
pushback(char[] chars)
Push a character array back into the stream. |
void |
pushback(char[] chars,
int off,
int len)
Push a part of a character array back into the stream. |
void |
pushback(Reader r)
Push the contents of a stream back into the stream. |
void |
pushback(String s)
Push a string back into the stream. |
int |
read()
|
int |
read(char[] cbuf,
int off,
int len)
|
| Methods inherited from class java.io.Reader |
|---|
mark, markSupported, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PushbackReader()
public PushbackReader(Reader r)
r - The first reader to be pushed back| Method Detail |
|---|
public void pushback(Reader r)
r - The reader to push backpublic void pushback(String s)
s - The String to push backpublic void pushback(char[] chars)
chars - The characters to push back
public void pushback(char[] chars,
int off,
int len)
chars - The character arrayoff - Offset of first character to push backlen - Number of characters to push back
public int read()
throws IOException
read in class ReaderIOException
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOException
public void close()
throws IOException
close in interface Closeableclose in class ReaderIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||