Class NullOutputStream

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

    public class NullOutputStream
    extends java.io.OutputStream
    An output stream that throws away its data.
    Author:
    Garret Wilson
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(int b)
      Writes the specified byte to this output stream.
      • Methods inherited from class java.io.OutputStream

        close, flush, nullOutputStream, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullOutputStream

        public NullOutputStream()
    • Method Detail

      • write

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