Class NullOutputStream

java.lang.Object
java.io.OutputStream
org.apache.commons.io.output.NullOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class NullOutputStream extends OutputStream
Never writes data. Calls never go beyond this class.

This output stream has no destination and all bytes written to it are ignored.

  • Field Details

  • Constructor Details

  • Method Details

    • write

      public void write(byte[] b) throws IOException
      Does nothing.
      Overrides:
      write in class OutputStream
      Parameters:
      b - The This method ignores this parameter.
      Throws:
      IOException - This method never throws any exceptions.
    • write

      public void write(byte[] b, int off, int len)
      Does nothing.
      Overrides:
      write in class OutputStream
      Parameters:
      b - This method ignores this parameter.
      off - This method ignores this parameter.
      len - This method ignores this parameter.
    • write

      public void write(int b)
      Does nothing.
      Specified by:
      write in class OutputStream
      Parameters:
      b - This method ignores this parameter.