Package org.apache.commons.io.output
Class NullPrintStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.PrintStream
-
- org.apache.commons.io.output.NullPrintStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
public class NullPrintStream extends java.io.PrintStreamNever prints data. Calls never go beyond this class.This print stream has no destination (file/socket etc.) and all bytes written to it are ignored and lost.
- Since:
- 2.7
-
-
Field Summary
Fields Modifier and Type Field Description static NullPrintStreamINSTANCEThe singleton instance.static NullPrintStreamNULL_PRINT_STREAMDeprecated.UseINSTANCE.
-
Constructor Summary
Constructors Constructor Description NullPrintStream()Deprecated.UseINSTANCE.
-
Method Summary
-
-
-
Field Detail
-
INSTANCE
public static final NullPrintStream INSTANCE
The singleton instance.- Since:
- 2.12.0
-
NULL_PRINT_STREAM
@Deprecated public static final NullPrintStream NULL_PRINT_STREAM
Deprecated.UseINSTANCE.The singleton instance.
-
-
Constructor Detail
-
NullPrintStream
@Deprecated public NullPrintStream()
Deprecated.UseINSTANCE.Constructs an instance.
-
-