de.intarsys.tools.reader
public class LogReader extends java.io.FilterReader
The reader is piped in the reading process, any characters read are written to an associated writer object.
Client -> LogReader -> Reader -> Source | v Writertodo make closing of associated writer configurable
Constructor and Description |
---|
LogReader(java.io.Reader in,
java.io.Writer w) |
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.FilterReader
java.io.IOException
public java.io.Writer getLog()
public int read() throws java.io.IOException
read
in class java.io.FilterReader
java.io.IOException
public int read(char[] cbuf, int off, int len) throws java.io.IOException
read
in class java.io.FilterReader
cbuf
- Destination bufferoff
- Offset at which to start storing characterslen
- Maximum number of characters to readjava.io.IOException
- If an I/O error occurspublic void setLog(java.io.Writer newLog)