railo.commons.io.auto
Class AutoCloseReader

java.lang.Object
  extended by java.io.Reader
      extended by railo.commons.io.auto.AutoCloseReader
All Implemented Interfaces:
Closeable, Readable

public final class AutoCloseReader
extends Reader

Close the Reader automaticlly when object will destroyed by the garbage


Constructor Summary
AutoCloseReader(Reader reader)
          constructor of the class
 
Method Summary
 void close()
           
 void finalize()
           
 void mark(int readAheadLimit)
           
 boolean markSupported()
           
 int read()
           
 int read(char[] cbuf)
           
 int read(char[] cbuf, int off, int len)
           
 boolean ready()
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCloseReader

public AutoCloseReader(Reader reader)
constructor of the class

Parameters:
reader -
Method Detail

close

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

mark

public void mark(int readAheadLimit)
          throws IOException
Overrides:
mark in class Reader
Throws:
IOException
See Also:
Reader.mark(int)

markSupported

public boolean markSupported()
Overrides:
markSupported in class Reader
See Also:
Reader.markSupported()

read

public int read()
         throws IOException
Overrides:
read in class Reader
Throws:
IOException
See Also:
Reader.read()

read

public int read(char[] cbuf,
                int off,
                int len)
         throws IOException
Specified by:
read in class Reader
Throws:
IOException
See Also:
Reader.read(char[], int, int)

read

public int read(char[] cbuf)
         throws IOException
Overrides:
read in class Reader
Throws:
IOException
See Also:
Reader.read(char[])

ready

public boolean ready()
              throws IOException
Overrides:
ready in class Reader
Throws:
IOException
See Also:
Reader.ready()

reset

public void reset()
           throws IOException
Overrides:
reset in class Reader
Throws:
IOException
See Also:
Reader.reset()

skip

public long skip(long n)
          throws IOException
Overrides:
skip in class Reader
Throws:
IOException
See Also:
Reader.skip(long)

finalize

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


Copyright © 2012 Railo