PushbackReader
public
class
PushbackReader
extends FilterReader
| java.lang.Object | |||
| ↳ | java.io.Reader | ||
| ↳ | java.io.FilterReader | ||
| ↳ | java.io.PushbackReader | ||
A character-stream reader that allows characters to be pushed back into the stream.
Summary
Inherited fields |
|---|
Public constructors | |
|---|---|
PushbackReader(Reader in)
Creates a new pushback reader with a one-character pushback buffer. |
|
PushbackReader(Reader in, int size)
Creates a new pushback reader with a pushback buffer of the given size. |
|
Public methods | |
|---|---|
void
|
close()
Closes the stream and releases any system resources associated with it. |
void
|
mark(int readAheadLimit)
Marks the present position in the stream. |
boolean
|
markSupported()
Tells whether this stream supports the mark() operation, which it does not. |
int
|
read()
Reads a single character. |
int
|
read(char[] cbuf, int off, int len)
Reads characters into a portion of an array. |
boolean
|
ready()
Tells whether this stream is ready to be read. |
void
|
reset()
Resets the stream. |
long
|
skip(long n)
Skips characters. |
void
|
unread(char[] cbuf, int off, int len)
Pushes back a portion of an array of characters by copying it to the front of the pushback buffer. |
void
|
unread(char[] cbuf)
Pushes back an array of characters by copying it to the front of the pushback buffer. |
void
|
unread(int c)
Pushes back a single character by copying it to the front of the pushback buffer. |
Inherited methods | |
|---|---|