Class NullOutputStream

java.lang.Object
java.io.OutputStream
com.globalmentor.io.NullOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class NullOutputStream extends OutputStream
An output stream that throws away its data.
Author:
Garret Wilson
  • Constructor Details

    • NullOutputStream

      public NullOutputStream()
  • Method Details

    • write

      public void write(int b) throws IOException
      Writes the specified byte to this output stream. This version does nothing.
      Specified by:
      write in class OutputStream
      Parameters:
      b - The byte to write.
      Throws:
      IOException - if an I/O error occurs.