? ClosedWriter
java.lang.Object
java.io.Writer
org.apache.commons.io.output.ClosedWriter
- ????????:
Closeable
,Flushable
,Appendable
,AutoCloseable
Throws an exception on all attempts to write with
close()
implemented as a noop.
Typically uses of this class include testing for corner cases in methods that accept a writer and acting as a
sentinel value instead of a null
writer.
- ???????:
- 2.7
-
????
?? -
?????
??? -
????
??????????void
close()
void
flush()
Throws anIOException
to indicate that the stream is closed.void
write
(char[] cbuf, int off, int len) Throws anIOException
to indicate that the writer is closed.
-
??????
-
CLOSED_WRITER
A singleton.
-
-
???????
-
ClosedWriter
public ClosedWriter()
-
-
??????
-
write
Throws anIOException
to indicate that the writer is closed.- ???:
write
???Writer
- ??:
cbuf
- ignoredoff
- ignoredlen
- ignored- ??:
IOException
- always thrown
-
flush
Throws anIOException
to indicate that the stream is closed.- ???:
flush
????Flushable
- ???:
flush
???Writer
- ??:
IOException
- always thrown
-
close
- ???:
close
????AutoCloseable
- ???:
close
????Closeable
- ???:
close
???Writer
- ??:
IOException
-