org.apache.pivot.io
Class EchoReader

java.lang.Object
  extended by java.io.Reader
      extended by org.apache.pivot.io.EchoReader
All Implemented Interfaces:
Closeable, Readable

public class EchoReader
extends Reader

Reader that echoes characters to the console as they are read.


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
EchoReader(Reader in)
           
EchoReader(Reader in, Writer echo)
           
 
Method Summary
 void close()
           
 int read(char[] cbuf, int off, int len)
           
 
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

EchoReader

public EchoReader(Reader in)

EchoReader

public EchoReader(Reader in,
                  Writer echo)
Method Detail

close

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

read

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