org.ajax4jsf.io
Class FastBufferReader

java.lang.Object
  extended by java.io.Reader
      extended by org.ajax4jsf.io.FastBufferReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class FastBufferReader
extends java.io.Reader

Class for reading from a char array chain.

Author:
glory

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
FastBufferReader(FastBufferWriter writer)
          Creates instance for given writer.
 
Method Summary
 int available()
          Returns the number of chars that may be read from this storage.
 void close()
           
 int read()
           
 int read(char[] cbuf, int off, int len)
           
 void writeTo(java.io.Writer writer)
          Writes rest of data written up to the moment to out.
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastBufferReader

public FastBufferReader(FastBufferWriter writer)
Creates instance for given writer.

Parameters:
writer -
Method Detail

close

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

read

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

read

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

available

public int available()
              throws java.io.IOException
Returns the number of chars that may be read from this storage.

Returns:
Throws:
java.io.IOException

writeTo

public void writeTo(java.io.Writer writer)
             throws java.io.IOException
Writes rest of data written up to the moment to out.

Parameters:
out -
Throws:
java.io.IOException


Copyright © 2010. All Rights Reserved.