JavaScript is disabled on your browser.
JavaScript is disabled on your browser.
All Implemented Interfaces:
Closeable
, AutoCloseable
, Readable
Direct Known Subclasses:
PushbackReader
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.
Since:
1.1
Field Summary
Fields
Modifier and Type
Field
Description
protected Reader
in
The underlying character-input stream.
Constructor Summary
Constructors
Modifier
Constructor
Description
protected
FilterReader (Reader in)
Creates a new filtered reader.
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method
Description
void
mark (int readAheadLimit)
Marks the present position in the stream.
boolean
markSupported ()
Tells whether this stream supports the mark() operation.
int
read ()
Reads a single character.
int
read (char[] cbuf,
int off,
int len)
Reads characters into a portion of an array.
boolean
ready ()
Tells whether this stream is ready to be read.
void
reset ()
Resets the stream.
long
skip (long n)
Skips characters.
Methods declared in class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Method Detail
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
Reads characters into a portion of an array.
Specified by:
read
in class Reader
Parameters:
cbuf
- Destination buffer
off
- Offset at which to start storing characters
len
- Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the
stream has been reached
Throws:
IOException
- If an I/O error occurs
IndexOutOfBoundsException
- If an I/O error occurs
JavaScript is disabled on your browser.
Report a bug or suggest an enhancement For further API reference and developer documentation see the Java SE Documentation , which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries. Copyright © 1993, 2024, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA. All rights reserved. Use is subject to license terms and the documentation redistribution policy .
Scripting on this page tracks web page traffic, but does not change the content in any way.