Class: java.io.FilterReader

  • public abstract class FilterReader
  • extends Reader
Abstract class for reading filtered character streams. The abstract class FilterReader itself provides default methods that pass all requests to the contained stream. Subclasses of FilterReader should override some of these methods and may also provide additional methods and fields.
Authors:
@author Mark Reinhold
Since:
@since JDK1.1

Inheritance

Superclass tree: Implements:

Methods

  • FilterReadertop

    protected FilterReader(Reader in)
    Creates a new filtered reader.
    Parameters:
    @param in a Reader object providing the underlying stream.
    Exceptions:
    @throws NullPointerException if in is null
    Google Code Search
    Stack Overflow
  • closetop

    public void close() throws IOException
    Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
    Exceptions:
    @throws IOException if an I/O error occurs
    Specified by:
    close from Closeable
    Override hierarchy:
    close from Reader
    Google Code Search
    Stack Overflow
  • marktop

    public void mark(int readAheadLimit) throws IOException
    Marks the present position in the stream.
    Parameters:
    @param 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.
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    mark from Reader
    Google Code Search
    Stack Overflow
  • markSupportedtop

    public boolean markSupported()
    Tells whether this stream supports the mark() operation.
    Return:
    @return true if and only if this stream supports the mark operation.
    Override hierarchy:
    markSupported from Reader
    Google Code Search
    Stack Overflow
  • readtop

    public int read() throws IOException
    Reads a single character.
    Return:
    @return The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    read from Reader
    Google Code Search
    Stack Overflow
  • readtop

    public int read(char[] cbuf, int off, int len) throws IOException
    Reads characters into a portion of an array.
    Parameters:
    @param cbuf Destination buffer
    @param off Offset at which to start storing characters
    @param len Maximum number of characters to read
    Return:
    @return The number of characters read, or -1 if the end of the stream has been reached
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    read from Reader
    Google Code Search
    Stack Overflow
  • readytop

    public boolean ready() throws IOException
    Tells whether this stream is ready to be read.
    Return:
    @return 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.
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    ready from Reader
    Google Code Search
    Stack Overflow
  • resettop

    public void reset() throws IOException
    Resets the stream.
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    reset from Reader
    Google Code Search
    Stack Overflow
  • skiptop

    public long skip(long n) throws IOException
    Skips characters.
    Parameters:
    @param n The number of characters to skip
    Return:
    @return The number of characters actually skipped
    Exceptions:
    @exception IOException If an I/O error occurs
    Override hierarchy:
    skip from Reader
    Google Code Search
    Stack Overflow

Fields

  • in

    protected Reader in
    The underlying character-input stream.