Package org.apache.commons.io.output
Class NullOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.io.output.NullOutputStream
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
Never writes data. Calls never go beyond this class.
 
This output stream has no destination and all bytes written to it are ignored.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final NullOutputStreamThe singleton instance.static final NullOutputStreamDeprecated.
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.io.OutputStreamclose, flush
- 
Field Details- 
INSTANCEThe singleton instance.- Since:
- 2.12.0
 
- 
NULL_OUTPUT_STREAMDeprecated.UseINSTANCE.The singleton instance.
 
- 
- 
Constructor Details
- 
Method Details- 
writeDoes nothing.- Overrides:
- writein class- OutputStream
- Parameters:
- b- The This method ignores this parameter.
- Throws:
- IOException- This method never throws any exceptions.
 
- 
writeDoes nothing.- Overrides:
- writein class- OutputStream
- Parameters:
- b- This method ignores this parameter.
- off- This method ignores this parameter.
- len- This method ignores this parameter.
 
- 
writeDoes nothing.- Specified by:
- writein class- OutputStream
- Parameters:
- b- This method ignores this parameter.
 
 
- 
INSTANCE.