Name

java.io.Writer

Synopsis

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 Object lock;

   // constructors
   protected Writer();
   protected Writer(Object lock);

   // public instance methods
   public abstract void close() throws java.io.IOException;
   public abstract void flush() throws java.io.IOException;
   public void write(int c) throws java.io.IOException;
   public void write(char[] cbuf) throws java.io.IOException;
   public abstract void write(char[] cbuf, int off, int len)
      throws java.io.IOException;
   public void write(String str) throws java.io.IOException;
   public void write(String str, int off, int len)
      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.