Class NullPrintStream

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class NullPrintStream extends PrintStream
Writes all data to the famous /dev/null.

This print stream has no destination (file/socket etc.) and all bytes written to it are ignored and lost.

Since:
2.7
  • Field Details

    • NULL_PRINT_STREAM

      public static final NullPrintStream NULL_PRINT_STREAM
      The singleton instance.
  • Constructor Details

    • NullPrintStream

      public NullPrintStream()
      Constructs an instance.