JBoss STDIO 1.0.0.GA

org.jboss.stdio
Class NullOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.jboss.stdio.NullOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class NullOutputStream
extends OutputStream

A null output stream, which ignores all output.


Constructor Summary
NullOutputStream()
           
 
Method Summary
static NullOutputStream getInstance()
          Get the singleton instance.
 void write(byte[] b)
          Ignore the written bytes.
 void write(byte[] b, int off, int len)
          Ignore the written bytes.
 void write(int b)
          Ignore the written byte.
 
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

getInstance

public static NullOutputStream getInstance()
Get the singleton instance.

Returns:
the instance

write

public void write(int b)
Ignore the written byte.

Specified by:
write in class OutputStream
Parameters:
b - ignored

write

public void write(byte[] b)
Ignore the written bytes.

Overrides:
write in class OutputStream
Parameters:
b - ignored

write

public void write(byte[] b,
                  int off,
                  int len)
Ignore the written bytes.

Overrides:
write in class OutputStream
Parameters:
b - ignored
off - ignored
len - ignored

JBoss STDIO 1.0.0.GA

Copyright © 2010 JBoss, a division of Red Hat, Inc.