jd.io
Class ClosedWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjd.io.ClosedWriter

class ClosedWriter
extends Writer

ClosedWriter is a Writer that helps to implement efficient proxy Writer classes. A proxy writer (like PrintWriter, FilterWriter, etc.) uses another writer to which he writes. For correctness he has to check at every write if the underlying writer was not closed before. Instead of checking this, the output writer can be exchanged with a ClosedWriter instead.


Field Summary
static ClosedWriter INSTANCE
           
 
Fields inherited from class java.io.Writer
lock
 
Method Summary
 void close()
           
 void flush()
           
 void write(char[] c, int off, int len)
           
 
Methods inherited from class java.io.Writer
write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ClosedWriter INSTANCE
Method Detail

close

public void close()

flush

public void flush()
           throws IOException
Throws:
IOException

write

public void write(char[] c,
                  int off,
                  int len)
           throws IOException
Throws:
IOException