railo.commons.io.auto
Class AutoCloseOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by railo.commons.io.auto.AutoCloseOutputStream
All Implemented Interfaces:
Closeable, Flushable

public final class AutoCloseOutputStream
extends OutputStream

Close the Stream automaticlly when object will destroyed by the garbage


Constructor Summary
AutoCloseOutputStream(OutputStream os)
          constructor of the class
 
Method Summary
 void close()
           
 void finalize()
           
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCloseOutputStream

public AutoCloseOutputStream(OutputStream os)
constructor of the class

Parameters:
os -
Method Detail

write

public void write(int b)
           throws IOException
Specified by:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(int)

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException
See Also:
OutputStream.close()

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException
See Also:
OutputStream.flush()

write

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

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStream
Throws:
IOException
See Also:
OutputStream.write(byte[])

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable
See Also:
Object.finalize()


Copyright © 2012 Railo