Name
java.io.Reader
Synopsis
This abstract class is identical to the J2SE
Reader
class. It is the superclass for all classes
that read character streams. The only methods that a
Reader
subclass must implement are the abstract
read()
and close()
methods,
although many implementations override other methods. Other important
methods include skip()
, which skips over the
specified number of characters, and close()
, which
closes the input stream and releases any resources associated with
it. Finally, the ready()
method returns a Boolean,
indicating if the stream can have more data read from it.
public abstract classReader
{ // protected fields protected Objectlock
; // constructors protectedReader
(); protectedReader
(Object lock); // public instance methods public abstract voidclose
() throws java.io.IOException; public voidmark
(int readAheadLimit) throws java.io.IOException; public booleanmarkSupported
(); public intread
() throws java.io.IOException; public intread
(char[] cbuf) throws java.io.IOException; public abstract intread
(char[] cbuf, int off, int len) throws java.io.IOException; public booleanready
() throws java.io.IOException; public voidreset
() throws java.io.IOException; public longskip
(long n) throws java.io.IOException; }
Get Wireless Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.