Closeable, Flushable, AutoCloseablepublic class ClosedOutputStream extends OutputStream
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.
| Modifier and Type | Field | Description |
|---|---|---|
static ClosedOutputStream |
CLOSED_OUTPUT_STREAM |
A singleton.
|
| Constructor | Description |
|---|---|
ClosedOutputStream() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
write(int b) |
Throws an
IOException to indicate that the stream is closed. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, flush, write, writepublic static final ClosedOutputStream CLOSED_OUTPUT_STREAM
public void write(int b)
throws IOException
IOException to indicate that the stream is closed.write in class OutputStreamb - ignoredIOException - always thrownCopyright © 2023 GeneXus S.A.. All rights reserved.