net.java.dev.webdav.addressbook
Class NullOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by net.java.dev.webdav.addressbook.NullOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public final class NullOutputStream
extends java.io.OutputStream

An OutputStream that discards the actual data but just counts the number of bytes written.

Author:
Markus KARG (mkarg@users.dev.java.net)
See Also:
getSize()

Constructor Summary
NullOutputStream()
           
 
Method Summary
 int getSize()
           
 void write(byte[] b)
           
 void write(byte[] b, 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
 

Constructor Detail

NullOutputStream

public NullOutputStream()
Method Detail

write

public final void write(byte[] b,
                        int off,
                        int len)
                 throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public final void write(byte[] b)
                 throws java.io.IOException
Overrides:
write in class java.io.OutputStream
Throws:
java.io.IOException

write

public final void write(int b)
                 throws java.io.IOException
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

getSize

public final int getSize()
Returns:
The number of bytes written into this stream.


Copyright © 2008-2010 The java.net WebDAV Project. All Rights Reserved.