January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.io.Reader
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; }
Read now
Unlock full access