public class TeeReader
extends java.io.FilterReader
FilterReader
that copies the bytes being passed through
to a given Writer
. This is in analogy with the UNIX "tee" command.Modifier and Type | Field and Description |
---|---|
private boolean |
closeWriterOnEOF |
private java.io.Writer |
out |
Constructor and Description |
---|
TeeReader(java.io.Reader in,
java.io.Writer out,
boolean closeWriterOnEof) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
private final java.io.Writer out
private final boolean closeWriterOnEOF
public TeeReader(java.io.Reader in, java.io.Writer out, boolean closeWriterOnEof)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterReader
java.io.IOException
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
java.io.IOException