to.etc.util
Class CopyingReader

java.lang.Object
  extended by java.io.Reader
      extended by to.etc.util.CopyingReader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class CopyingReader
extends java.io.Reader

This is a reader class which appends all of the data read to an appendable. Created on Aug 23, 2005

Author:
Frits Jalvingh

Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
CopyingReader(java.io.Reader r, java.io.Writer sb)
           
 
Method Summary
 void close()
           
 java.lang.String getRead()
           
 int read(char[] cbuf, int off, int len)
          Read the crud, and append all that was read to the string buffer also.
 
Methods inherited from class java.io.Reader
mark, markSupported, read, 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

CopyingReader

public CopyingReader(java.io.Reader r,
                     java.io.Writer sb)
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
See Also:
Reader.close()

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Read the crud, and append all that was read to the string buffer also.

Specified by:
read in class java.io.Reader
Throws:
java.io.IOException

getRead

public java.lang.String getRead()