org.dmonix.io
Class NullOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.dmonix.io.NullOutputStream

public class NullOutputStream
extends java.io.OutputStream

This is an void outputstream that doesn't write anything.
The result is the same as to write to /dev/null/ on Solaris/Linux, i.e. all data is written to void.

Copyright: Copyright (c) 2005

Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Constructor Summary
NullOutputStream()
           
 
Method Summary
 void flush()
          Does nothing.
 void write(byte[] b)
          Does nothing.
 void write(byte[] b, int offset, int length)
          Does nothing.
 void write(int b)
          Does nothing.
 
Methods inherited from class java.io.OutputStream
close
 
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 void write(int b)
           throws java.io.IOException
Does nothing.

Parameters:
b - The data
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Does nothing.

Parameters:
b - The data
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Does nothing.

Throws:
java.io.IOException

write

public void write(byte[] b,
                  int offset,
                  int length)
           throws java.io.IOException
Does nothing.

Parameters:
b - The data
offset - The offset in the array
length - The amount of data to write
Throws:
java.io.IOException


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.