|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.Reader | +--java.io.FilterReader | +--java.io.PushbackReader
Fields inherited from class java.io.FilterReader | |
in |
Fields inherited from class java.io.Reader | |
lock |
Constructor Summary | |
PushbackReader(Reader in,
int size)
Create a new pushback reader with a pushback buffer of the given size. |
|
PushbackReader(Reader in)
Create a new pushback reader with a one-character pushback buffer. |
Method Summary | |
void | close()
Close the stream. |
boolean | markSupported()
Tell whether this stream supports the mark() operation, which it does not. |
int | read()
Read a single character. |
int | read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array. |
boolean | ready()
Tell whether this stream is ready to be read. |
void | unread(char[] cbuf,
int off,
int len)
Push back a portion of an array of characters by copying it to the front of the pushback buffer. |
void | unread(char[] cbuf)
Push back an array of characters by copying it to the front of the pushback buffer. |
void | unread(int c)
Push back a single character. |
Methods inherited from class java.io.FilterReader | |
mark , reset , skip |
Methods inherited from class java.io.Reader | |
read |
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
Constructor Detail |
public PushbackReader(Reader in, int size)
in
- The reader from which characters will be read
size
- The size of the pushback bufferpublic PushbackReader(Reader in)
in
- The reader from which characters will be readMethod Detail |
public int read() throws IOException
public int read(char[] cbuf, int off, int len) throws IOException
cbuf
- Destination buffer
off
- Offset at which to start writing characters
len
- Maximum number of characters to readpublic void unread(int c) throws IOException
c
- The character to push backpublic void unread(char[] cbuf, int off, int len) throws IOException
cbuf[off]
, the
character after that will have the value cbuf[off+1]
, and
so forth.
cbuf
- Character array
off
- Offset of first character to push back
len
- Number of characters to push backpublic void unread(char[] cbuf) throws IOException
cbuf[0]
, the character after that
will have the value cbuf[1]
, and so forth.
cbuf
- Character array to push backpublic boolean ready() throws IOException
public boolean markSupported()
public void close() throws IOException
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |