com.croftsoft.core.io
Class EchoReader
java.lang.Object
java.io.Reader
java.io.FilterReader
com.croftsoft.core.io.EchoReader
- All Implemented Interfaces:
- Closeable, Readable
public final class EchoReader
- extends FilterReader
A FilterReader that echoes characters read to a Writer.
- Since:
- 2002-09-19
- Version:
- 2002-09-19
- Author:
- David Wallace Croft
Method Summary |
void |
close()
Flushes the echoWriter in addition to closing the input. |
int |
read()
|
int |
read(char[] cbuf)
|
int |
read(char[] cbuf,
int off,
int len)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EchoReader
public EchoReader(Reader in,
Writer echoWriter)
- Main constructor.
EchoReader
public EchoReader(Reader in)
- Echoes to the standard output.
this ( in, new PrintWriter ( System.out ) );
read
public int read()
throws IOException
- Overrides:
read
in class FilterReader
- Throws:
IOException
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Overrides:
read
in class FilterReader
- Throws:
IOException
read
public int read(char[] cbuf)
throws IOException
- Overrides:
read
in class Reader
- Throws:
IOException
close
public void close()
throws IOException
- Flushes the echoWriter in addition to closing the input.
- Specified by:
close
in interface Closeable
- Overrides:
close
in class FilterReader
- Throws:
IOException
CroftSoft Core Javadoc (2008-09-28 20:58:02)