Package org.codehaus.janino.util
Class TeeReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- org.codehaus.janino.util.TeeReader
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class TeeReader extends java.io.FilterReaderAFilterReaderthat copies the bytes being passed through to a givenWriter. This is in analogy with the UNIX "tee" command.
-
-
Constructor Summary
Constructors Constructor Description TeeReader(java.io.Reader in, java.io.Writer out, boolean closeWriterOnEof)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread()intread(char[] cbuf, int off, int len)
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.FilterReader- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classjava.io.FilterReader- Throws:
java.io.IOException
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.FilterReader- Throws:
java.io.IOException
-
-