? ClosedOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.io.output.ClosedOutputStream
- ????????:
Closeable
,Flushable
,AutoCloseable
Throws an exception on all attempts to write to the stream.
Typically uses of this class include testing for corner cases in methods that accept an output stream and acting as a
sentinel value instead of a null
output stream.
- ???????:
- 1.4
-
????
?? -
?????
??? -
????
??????????void
flush()
Throws anIOException
to indicate that the stream is closed.void
write
(int b) Throws anIOException
to indicate that the stream is closed.??????? java.io.OutputStream
close, nullOutputStream, write, write
-
??????
-
CLOSED_OUTPUT_STREAM
A singleton.
-
-
???????
-
ClosedOutputStream
public ClosedOutputStream()
-
-
??????
-
write
Throws anIOException
to indicate that the stream is closed.- ???:
write
???OutputStream
- ??:
b
- ignored- ??:
IOException
- always thrown
-
flush
Throws anIOException
to indicate that the stream is closed.- ???:
flush
????Flushable
- ??:
flush
???OutputStream
- ??:
IOException
- always thrown
-