Class DummyOutputStream

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable, Modified

    public class DummyOutputStream
    extends OutputStream
    A writable sink for bytes. This is a simple helper class. System.out will open such a DummyOutputStream as a default. A user will later redirect System.out to a physically available device.
    • Constructor Detail

      • DummyOutputStream

        public DummyOutputStream()
    • Method Detail

      • write

        public void write​(int oneByte)
                   throws IOException
        Description copied from class: OutputStream
        Writes a single byte to this stream. Only the least significant byte of the integer oneByte is written to the stream.
        Specified by:
        write in class OutputStream
        Parameters:
        oneByte - the byte to be written.
        Throws:
        IOException - if an error occurs while writing to this stream.