public class TraceOutputStream extends FilterOutputStream
out| Constructor and Description | 
|---|
| TraceOutputStream(OutputStream out,
                 MailLogger logger)Creates an output stream filter built on top of the specified
 underlying output stream. | 
| TraceOutputStream(OutputStream out,
                 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.lengthbytes to this output stream. | 
| void | write(int b)Writes the specified  byteto this output stream. | 
close, flush, writepublic TraceOutputStream(OutputStream out, MailLogger logger)
out - the underlying output stream.logger - log trace herepublic TraceOutputStream(OutputStream out, OutputStream traceOut)
out - the underlying output stream.traceOut - the trace stream.public void setTrace(boolean trace)
trace - the trace modepublic void setQuote(boolean quote)
quote - the quote modepublic void write(int b)
           throws IOException
byte to this output stream.
 Writes out the byte into the trace stream if the trace mode
 is truewrite in class FilterOutputStreamb - the byte to writeIOException - for I/O errorspublic void write(byte[] b,
                  int off,
                  int len)
           throws IOException
b.length bytes to this output stream.
 Writes out the bytes into the trace stream if the trace
 mode is truewrite in class FilterOutputStreamb - bytes to writeoff - offset in arraylen - number of bytes to writeIOException - for I/O errorsCopyright © 2017 JBoss by Red Hat. All rights reserved.