public class

TraceOutputStream

extends FilterOutputStream
java.lang.Object
   ↳ java.io.OutputStream
     ↳ java.io.FilterOutputStream
       ↳ com.google.code.com.sun.mail.util.TraceOutputStream

Class Overview

This class is a subclass of DataOutputStream that copies the data being written into the DataOutputStream into another output stream. This class is used here to provide a debug trace of the stuff thats being written out into the DataOutputStream.

Summary

Fields
private boolean quote
private boolean trace
private OutputStream traceOut
[Expand]
Inherited Fields
From class java.io.FilterOutputStream
Public Constructors
TraceOutputStream(OutputStream out, OutputStream traceOut)
Creates an output stream filter built on top of the specified underlying output stream.
Public Methods
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.
[Expand]
Inherited Methods
From class java.io.FilterOutputStream
From class java.io.OutputStream
From class java.lang.Object
From interface java.io.Closeable
From interface java.io.Flushable

Fields

private boolean quote

private boolean trace

private OutputStream traceOut

Public Constructors

public TraceOutputStream (OutputStream out, OutputStream traceOut)

Creates an output stream filter built on top of the specified underlying output stream.

Parameters
out The underlying output stream.
traceOut The trace stream.

Public Methods

public void setQuote (boolean quote)

Set quote mode.

Parameters
quote The quote mode

public void setTrace (boolean trace)

Set the trace mode.

Parameters
trace

public void write (byte[] b, int off, int len)

Writes b.length bytes to this output stream. Writes out the bytes into the trace stream if the trace mode is true

Parameters
b
off
len
Throws
IOException

public void write (int b)

Writes the specified byte to this output stream. Writes out the byte into the trace stream if the trace mode is true

Parameters
b
Throws
IOException