January 2002
Intermediate to advanced
264 pages
8h 3m
English
java.io.Writer
This abstract class is identical to the J2SE
Writer class. It is the superclass for all classes
that write character streams. The only methods that a
Writer subclass must implement are the abstract
write(), flush(), and
close() methods, although many implementations
override other methods. Several write() methods
are provided to output single characters, arrays (or sub-arrays), or
characters, strings, and substrings.
public abstract classWriter{ // protected fields protected Objectlock; // constructors protectedWriter(); protectedWriter(Object lock); // public instance methods public abstract voidclose() throws java.io.IOException; public abstract voidflush() throws java.io.IOException; public voidwrite(int c) throws java.io.IOException; public voidwrite(char[] cbuf) throws java.io.IOException; public abstract voidwrite(char[] cbuf, int off, int len) throws java.io.IOException; public voidwrite(String str) throws java.io.IOException; public voidwrite(String str, int off, int len) throws java.io.IOException; }
Read now
Unlock full access