- Direct Known Subclasses:
public abstract class FilterReader extends Reader
Abstract 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.
Fields Modifier and Type Field Description
inThe underlying character-input stream.
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.
inprotected Reader inThe underlying character-input stream.
readpublic int read() throws IOExceptionReads a single character.
readpublic 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
offis negative, or
lenis negative, or
lenis greater than
cbuf.length - off
skippublic long skip(long n) throws IOExceptionSkips characters.
readypublic boolean ready() throws IOExceptionTells whether this stream is ready to be read.
markSupportedpublic boolean markSupported()Tells whether this stream supports the mark() operation.
markpublic void mark(int readAheadLimit) throws IOExceptionMarks the present position in the stream.
resetpublic void reset() throws IOExceptionResets the stream.