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
Writer
todo make closing of associated writer configurable| Constructor and Description |
|---|
LogReader(java.io.Reader in,
java.io.Writer w) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.io.Writer |
getLog() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len)
Read characters into a portion of an array.
|
void |
setLog(java.io.Writer newLog) |
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterReaderjava.io.IOExceptionpublic java.io.Writer getLog()
public int read()
throws java.io.IOException
read in class java.io.FilterReaderjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterReadercbuf - 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)