com.tffenterprises.io
Class NullOutputStream

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

public final class NullOutputStream
extends java.io.OutputStream

com.tffenterprises.io.NullOutputStream is the moral equivalent of Unix's /dev/null: a data sink, no questions asked.

com.tffenterprises.io.NullOutputStream throws no exceptions.

Version:
1.0d1 $Date: 2000/06/20 02:52:25 $
Author:
Guillaume Lessard

Constructor Summary
NullOutputStream()
          Creates a NullOutputStream.
 
Method Summary
 void close()
          Does nothing.
 void flush()
          Does nothing.
 void write(byte[] b)
          Does nothing with the data.
 void write(byte[] b, int off, int len)
          Does nothing with the data.
 void write(int b)
          Does nothing with a byte.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullOutputStream

public NullOutputStream()
Creates a NullOutputStream.

Method Detail

close

public void close()
Does nothing.

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream

flush

public void flush()
Does nothing.

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream

write

public void write(byte[] b)
Does nothing with the data.

Overrides:
write in class java.io.OutputStream
Parameters:
b - the data to be ignored.

write

public void write(byte[] b,
                  int off,
                  int len)
Does nothing with the data.

Overrides:
write in class java.io.OutputStream
Parameters:
b - the data to be ignored.
off - the offset to be ignored.
len - the length of data to be ignored.

write

public void write(int b)
Does nothing with a byte.

Specified by:
write in class java.io.OutputStream
Parameters:
b - an int representing a byte to be ignored.