gausssoft.io
Class SafeOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--gausssoft.io.SafeOutputStream

public class SafeOutputStream
extends FilterOutputStream

This class is used to indicate an OutputStream which will not throw an IOException upon any method invocation.

This class simply wraps around another OutputStream, and swallows any potential IOExceptions that are thrown. All contracts of the methods specified by OutputStream are the same.

Author:
Allan Crooks
See Also:
OutputStream

Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
SafeOutputStream(OutputStream out)
          Constructs a SafeOutputStream, wrapping around another OutputStream.
 
Method Summary
 void close()
           
 void flush()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeOutputStream

public SafeOutputStream(OutputStream out)
Constructs a SafeOutputStream, wrapping around another OutputStream.
Parameters:
out - The OutputStream to wrap around.
Throws:
NullPointerException - If out is null.
Method Detail

write

public void write(int b)
Overrides:
write in class FilterOutputStream

write

public void write(byte[] b)
Overrides:
write in class FilterOutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
Overrides:
write in class FilterOutputStream

flush

public void flush()
Overrides:
flush in class FilterOutputStream

close

public void close()
Overrides:
close in class FilterOutputStream