org.apache.tools.ant.util

## Class NullOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.tools.ant.util.NullOutputStream

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

      public class NullOutputStream
      extends java.io.OutputStream

  OutputStream that completely discards all data written to it.
  Since:
    Ant 1.10.10

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static NullOutputStream` | `INSTANCE` Shared instance which is safe to use concurrently as the stream doesn't hold any state at all.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `write(byte[] b)` Doesn't do anything.
    `void` | `write(byte[] b, int off, int len)` Doesn't do anything.
    `void` | `write(int i)` Doesn't do anything.

    - ### Methods inherited from class java.io.OutputStream

      `close, flush`

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

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

- - ### Field Detail

    - #### INSTANCE

          public static NullOutputStream INSTANCE

      Shared instance which is safe to use concurrently as the stream doesn't hold any state at all.

  - ### Method Detail

    - #### write

          public void write(byte[] b)

      Doesn't do anything.
      Overrides:
        `write` in class `java.io.OutputStream`

    - #### write

          public void write(byte[] b,
                            int off,
                            int len)

      Doesn't do anything.
      Overrides:
        `write` in class `java.io.OutputStream`

    - #### write

          public void write(int i)

      Doesn't do anything.
      Specified by:
        `write` in class `java.io.OutputStream`