org.jboss.resource.adapter.jdbc.remote
Class SerializableReader

java.lang.Object
  extended byjava.io.Reader
      extended byorg.jboss.resource.adapter.jdbc.remote.SerializableReader
All Implemented Interfaces:
java.io.Serializable

public class SerializableReader
extends java.io.Reader
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  char[] buf
           
protected  int count
           
protected  int mark
           
protected  int pos
           
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
SerializableReader(java.io.Reader reader)
           
 
Method Summary
 void close()
          Close the stream.
 int read(char[] cbuf, int off, int len)
          Read characters into a portion of an array.
 
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
 

Field Detail

buf

protected char[] buf

pos

protected int pos

mark

protected int mark

count

protected int count
Constructor Detail

SerializableReader

public SerializableReader(java.io.Reader reader)
                   throws java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.

Throws:
java.io.IOException - If an I/O error occurs

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

Parameters:
cbuf - Destination buffer
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
java.io.IOException - If an I/O error occurs