railo.commons.io.auto
Class AutoCloseWriter

java.lang.Object
  extended by java.io.Writer
      extended by railo.commons.io.auto.AutoCloseWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public final class AutoCloseWriter
extends Writer

Close the Writer automaticlly when object will destroyed by the garbage


Constructor Summary
AutoCloseWriter(Writer writer)
          constructor of the class
 
Method Summary
 void close()
           
 void finalize()
           
 void flush()
           
 void write(char[] cbuf)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(String str)
           
 void write(String str, int off, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCloseWriter

public AutoCloseWriter(Writer writer)
constructor of the class

Parameters:
writer -
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class Writer
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in class Writer
Throws:
IOException

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
Specified by:
write in class Writer
Throws:
IOException

write

public void write(char[] cbuf)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(int c)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

write

public void write(String str)
           throws IOException
Overrides:
write in class Writer
Throws:
IOException

finalize

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


Copyright © 2012 Railo