Class NullOutputStream
java.lang.Object
java.io.OutputStream
org.glassfish.jersey.message.internal.NullOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
A
"dev/null"
output stream - an output stream implementation that discards all the
data written to it. This implementation is not thread-safe.
Note that once a null output stream instance is closed
, any subsequent attempts
to write the data to the closed stream result in an IOException
being thrown.- Author:
- Miroslav Fuksa, Marek Potociar
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
NullOutputStream
public NullOutputStream()
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-