java.lang.Object
java.io.OutputStream
i2p.susi.util.DummyOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class DummyOutputStreamextends OutputStream
OutputStream that discards all written data.
  • Constructor Details

    • DummyOutputStream

      public DummyOutputStream()
      Create a stream that discards all output.
  • Method Details

    • write

      public void write(int val)
      Discard a single byte.
      Specified by:
      write in class OutputStream
      Parameters:
      val - the byte value (ignored)
    • write

      public void write(byte[] src)
      Discard all bytes in the array.
      Overrides:
      write in class OutputStream
      Parameters:
      src - the byte array (ignored)
    • write

      public void write(byte[] src, int off, int len)
      Discard bytes from the array.
      Overrides:
      write in class OutputStream
      Parameters:
      src - the byte array (ignored)
      off - the start offset (ignored)
      len - the number of bytes (ignored)
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream