java.io.Closeable, java.lang.AutoCloseablepublic class TraceInputStream
extends java.io.FilterInputStream
| Constructor | Description |
|---|---|
TraceInputStream(java.io.InputStream in,
MailLogger logger) |
Creates an input stream filter built on top of the specified
input stream.
|
TraceInputStream(java.io.InputStream in,
java.io.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.
|
public TraceInputStream(java.io.InputStream in,
MailLogger logger)
in - the underlying input stream.logger - log trace herepublic TraceInputStream(java.io.InputStream in,
java.io.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 java.io.IOException
-1 if no data is available. Writes out the read
byte into the trace stream, if trace mode is trueread in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.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 java.io.FilterInputStreamjava.io.IOExceptionCopyright © 2018 Oracle. All rights reserved.