Closeable, AutoCloseablepublic class TraceInputStream extends FilterInputStream
in| Constructor | Description |
|---|---|
TraceInputStream(InputStream in,
MailLogger logger) |
Creates an input stream filter built on top of the specified
input stream.
|
TraceInputStream(InputStream in,
OutputStream traceOut) |
Creates an input stream filter built on top of the specified
input stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
read() |
Reads the next byte of data from this input stream.
|
int |
read(byte[] b,
int off,
int len) |
Reads up to
len bytes of data from this input stream
into an array of bytes. |
void |
setQuote(boolean quote) |
Set quote mode.
|
void |
setTrace(boolean trace) |
Set trace mode.
|
available, close, mark, markSupported, read, reset, skipreadAllBytes, readNBytes, transferTopublic TraceInputStream(InputStream in, MailLogger logger)
in - the underlying input stream.logger - log trace herepublic TraceInputStream(InputStream in, OutputStream traceOut)
in - the underlying input stream.traceOut - the trace stream.public void setTrace(boolean trace)
trace - the trace modepublic void setQuote(boolean quote)
quote - the quote modepublic int read()
throws IOException
-1 if no data is available. Writes out the read
byte into the trace stream, if trace mode is trueread in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
len bytes of data from this input stream
into an array of bytes. Returns -1 if no more data
is available. Writes out the read bytes into the trace stream, if
trace mode is trueread in class FilterInputStreamIOExceptionCopyright © 2018 Oracle. All rights reserved.