- Direct Known Subclasses:
public abstract class FilterReader extends ReaderAbstract class for reading filtered character streams. The abstract class
FilterReaderitself provides default methods that pass all requests to the contained stream. Subclasses of
FilterReadershould override some of these methods and may also provide additional methods and fields.
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
mark(int readAheadLimit)Marks the present position in the stream.
markSupported()Tells whether this stream supports the mark() operation.
read()Reads a single character.
read(char cbuf, int off, int len)Reads characters into a portion of an array.
ready()Tells whether this stream is ready to be read.
reset()Resets the stream.
skip(long n)Skips characters.
protected Reader inThe underlying character-input stream.
public int read() throws IOExceptionReads a single character.
public int read(char cbuf, int off, int len) throws IOExceptionReads characters into a portion of an array.
- Specified by:
cbuf- Destination buffer
off- Offset at which to start storing characters
len- Maximum number of characters to read
- The number of characters read, or -1 if the end of the stream has been reached
IOException- If an I/O error occurs
IndexOutOfBoundsException- If an I/O error occurs
public long skip(long n) throws IOExceptionSkips characters.
public boolean ready() throws IOExceptionTells whether this stream is ready to be read.
public boolean markSupported()Tells whether this stream supports the mark() operation.
public void mark(int readAheadLimit) throws IOExceptionMarks the present position in the stream.