de.uniba.wiai.lspi.util.console
Class DummyOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by de.uniba.wiai.lspi.util.console.DummyOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class DummyOutputStream
extends OutputStream

Dummy output stream that writes nothing. Can be used to substitute System.out with, so that no calls to e.g. System.out.println() are displayed in the console window. The calls result in nothing being printed.


Constructor Summary
DummyOutputStream()
          Creates a new instance of DummyOutputStream
 
Method Summary
 void write(int b)
          Overwritten from OutputStream.
 
Methods inherited from class java.io.OutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyOutputStream

public DummyOutputStream()
Creates a new instance of DummyOutputStream

Method Detail

write

public void write(int b)
           throws IOException
Overwritten from OutputStream. This method does nothing. The byte that should be written is thrown away.

Specified by:
write in class OutputStream
Parameters:
b - This byte is thrown away. Nothing is really written.
Throws:
IOException - Does not occur as nothing is really written.


Copyright © 2004-2008 Karsten Loesing, Sven Kaffille - Distributed and Mobile Systems Group, Lehrstuhl für Praktische Informatik, Universität Bamberg. All Rights Reserved.