jd.io
Class ClosedWriter
java.lang.Object
java.io.Writer
jd.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.
Method Summary |
void |
close()
|
void |
flush()
|
void |
write(char[] c,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final ClosedWriter INSTANCE
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