public class TraceOutputStream
extends java.io.FilterOutputStream
| Modifier and Type | Field and Description |
|---|---|
private boolean |
quote |
private boolean |
trace |
private java.io.OutputStream |
traceOut |
| Constructor and Description |
|---|
TraceOutputStream(java.io.OutputStream out,
MailLogger logger)
Creates an output stream filter built on top of the specified
underlying output stream.
|
TraceOutputStream(java.io.OutputStream out,
java.io.OutputStream traceOut)
Creates an output stream filter built on top of the specified
underlying output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setQuote(boolean quote)
Set quote mode.
|
void |
setTrace(boolean trace)
Set the trace mode.
|
void |
write(byte[] b,
int off,
int len)
Writes
b.length bytes to this output stream. |
void |
write(int b)
Writes the specified
byte to this output stream. |
private void |
writeByte(int b)
Write a byte in a way that every byte value is printable ASCII.
|
private boolean trace
private boolean quote
private java.io.OutputStream traceOut
public TraceOutputStream(java.io.OutputStream out,
MailLogger logger)
out - the underlying output stream.logger - log trace herepublic TraceOutputStream(java.io.OutputStream out,
java.io.OutputStream traceOut)
out - the underlying output stream.traceOut - the trace stream.public void setTrace(boolean trace)
public void setQuote(boolean quote)
quote - the quote modepublic void write(int b)
throws java.io.IOException
byte to this output stream.
Writes out the byte into the trace stream if the trace mode
is truewrite in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
b.length bytes to this output stream.
Writes out the bytes into the trace stream if the trace
mode is truewrite in class java.io.FilterOutputStreamjava.io.IOExceptionprivate final void writeByte(int b)
throws java.io.IOException
java.io.IOException