com.sun.mail.util
类 TraceOutputStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 java.io.FilterOutputStream
          继承者 com.sun.mail.util.TraceOutputStream
所有已实现的接口:
Closeable, Flushable

public class TraceOutputStream
extends FilterOutputStream

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.

作者:
John Mani

字段摘要
 
从类 java.io.FilterOutputStream 继承的字段
out
 
构造方法摘要
TraceOutputStream(OutputStream out, OutputStream traceOut)
          Creates an output stream filter built on top of the specified underlying output stream.
 
方法摘要
 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.
 
从类 java.io.FilterOutputStream 继承的方法
close, flush, write
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

TraceOutputStream

public TraceOutputStream(OutputStream out,
                         OutputStream traceOut)
Creates an output stream filter built on top of the specified underlying output stream.

参数:
out - the underlying output stream.
traceOut - the trace stream.
方法详细信息

setTrace

public void setTrace(boolean trace)
Set the trace mode.


setQuote

public void setQuote(boolean quote)
Set quote mode.

参数:
quote - the quote mode

write

public void write(int b)
           throws IOException
Writes the specified byte to this output stream. Writes out the byte into the trace stream if the trace mode is true

覆盖:
FilterOutputStream 中的 write
抛出:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Writes b.length bytes to this output stream. Writes out the bytes into the trace stream if the trace mode is true

覆盖:
FilterOutputStream 中的 write
抛出:
IOException


Copyright © 2013. All Rights Reserved.