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:
  `Closeable`, `Flushable`, `Appendable`, `AutoCloseable`

public class NullPrintStream extends PrintStream
Never 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 final NullPrintStream`
  `INSTANCE`
  The singleton instance.
  `static final NullPrintStream`
  `NULL_PRINT_STREAM`
  Deprecated.
  Use `INSTANCE`.

  ### Fields inherited from class java.io.FilterOutputStream

  `out`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NullPrintStream()`
  Deprecated.
  Use `INSTANCE`.

- ## Method Summary

  ### Methods inherited from class java.io.PrintStream

  `append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write`

  ### Methods inherited from class java.io.FilterOutputStream

  `write`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### 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.
    Use `INSTANCE`.
    The singleton instance.

- ## Constructor Details

  - ### NullPrintStream

    @Deprecated public NullPrintStream()
    Deprecated.
    Use `INSTANCE`.
    Constructs an instance.