to.etc.util
Class NullOutputStream
java.lang.Object
java.io.OutputStream
to.etc.util.NullOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class NullOutputStream
- extends java.io.OutputStream
This is an outputstream which accepts data and sends it to the bit
bucket (no data is stored). The amount of data sent to the stream is
counted though. Although this class specified throws thingies it never
throws an exception (throwing data away is never an error ;-)
- Author:
- Frits Jalvingh
Field Summary |
long |
m_sz_written
The #of bytes currently written. |
Method Summary |
long |
getSzWritten()
Returns the #bytes currently written. |
void |
reset()
Resets the size written. |
void |
write(byte[] parm1)
|
void |
write(byte[] parm1,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
close, flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_sz_written
public long m_sz_written
- The #of bytes currently written.
NullOutputStream
public NullOutputStream()
write
public void write(byte[] parm1)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] parm1,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
getSzWritten
public long getSzWritten()
- Returns the #bytes currently written.
reset
public void reset()
- Resets the size written.