ch.javasoft.io
Class NullOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by ch.javasoft.io.NullOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class NullOutputStream
extends OutputStream

The NullOutputStream writes to /dev/null, which means that everything which is written to this output stream is simply ignored and goes to nowhere.


Field Summary
static NullOutputStream NULL
           
 
Method Summary
 void close()
           
 void flush()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final NullOutputStream NULL
Method Detail

write

public void write(int b)
Specified by:
write in class OutputStream

write

public void write(byte[] b)
Overrides:
write in class OutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class OutputStream

flush

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

close

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