Pushes back a single character by copying it to the front of the
pushback buffer. After this method returns, the next character to be read
will have the value (char)c.
Parameters:
c - The int value representing a character to be pushed back
Throws:
IOException - If the pushback buffer is full,
or if some other I/O error occurs
unread
public void unread(char[] cbuf,
int off,
int len)
throws IOException
Pushes back a portion of an array of characters by copying it to the
front of the pushback buffer. After this method returns, the next
character to be read will have the value cbuf[off], the
character after that will have the value cbuf[off+1], and
so forth.
Parameters:
cbuf - Character array
off - Offset of first character to push back
len - Number of characters to push back
Throws:
IOException - If there is insufficient room in the pushback
buffer, or if some other I/O error occurs
unread
public void unread(char[] cbuf)
throws IOException
Pushes back an array of characters by copying it to the front of the
pushback buffer. After this method returns, the next character to be
read will have the value cbuf[0], the character after that
will have the value cbuf[1], and so forth.
Parameters:
cbuf - Character array to push back
Throws:
IOException - If there is insufficient room in the pushback
buffer, or if some other I/O error occurs
True if the next read() is guaranteed not to block for input,
false otherwise. Note that returning false does not guarantee that the
next read will block.
readAheadLimit - Limit on the number of characters that may be
read while still preserving the mark. After
reading this many characters, attempting to
reset the stream may fail.
Closes the stream and releases any system resources associated with
it. Once the stream has been closed, further read(),
unread(), ready(), or skip() invocations will throw an IOException.
Closing a previously closed stream has no effect. This method will block
while there is another thread blocking on the reader.