org.apache.geronimo.javamail.util
Class TraceOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.apache.geronimo.javamail.util.TraceOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class TraceOutputStream
extends FilterOutputStream

Version:
$Rev: 668615 $ $Date: 2008-06-17 07:06:18 -0400 (Tue, 17 Jun 2008) $

Field Summary
protected  boolean debug
           
protected  OutputStream traceStream
           
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TraceOutputStream(OutputStream out, OutputStream traceStream, boolean debug, boolean encode)
          Construct a debug trace stream.
 
Method Summary
 void setDebug(boolean d)
          Set the current setting of the debug trace stream debug flag.
 void write(int b)
          Write a single byte to the output stream.
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug

traceStream

protected OutputStream traceStream
Constructor Detail

TraceOutputStream

public TraceOutputStream(OutputStream out,
                         OutputStream traceStream,
                         boolean debug,
                         boolean encode)
Construct a debug trace stream.

Parameters:
out - The target out put stream.
traceStream - The side trace stream to which trace data gets written.
encode - Indicates whether we wish the Trace data to be Q-P encoded.
Method Detail

setDebug

public void setDebug(boolean d)
Set the current setting of the debug trace stream debug flag.

Parameters:
d - The new debug flag settings.

write

public void write(int b)
           throws IOException
Write a single byte to the output stream.

Overrides:
write in class FilterOutputStream
Parameters:
b - The byte to be written.
Throws:
IOException - thrown for any I/O errors.


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.