public class LogInputStream extends FilterInputStream
InputStream that logs any char read.
This stream is piped in the reading process, any characters read are written
to an associated OutputStream object.
Client -> LogInputStream -> InputStream -> Source
|
v
OutputStream
| Constructor and Description |
|---|
LogInputStream(InputStream newin,
OutputStream newlog) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
OutputStream |
getLog() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
setLog(OutputStream newLog) |
available, mark, markSupported, read, reset, skippublic LogInputStream(InputStream newin, OutputStream newlog)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic OutputStream getLog()
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic void setLog(OutputStream newLog)
Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.