|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
com.sun.mail.util.TraceInputStream
public class TraceInputStream
This class is a FilterInputStream that writes the bytes being read from the given input stream into the given output stream. This class is typically used to provide a trace of the data that is being retrieved from an input stream.
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
TraceInputStream(java.io.InputStream in,
java.io.OutputStream traceOut)
Creates an input stream filter built on top of the specified input stream. |
Method Summary | |
---|---|
int |
read()
Reads the next byte of data from this input stream. |
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream
into an array of bytes. |
void |
setQuote(boolean quote)
Set quote mode. |
void |
setTrace(boolean trace)
Set trace mode. |
Methods inherited from class java.io.FilterInputStream |
---|
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TraceInputStream(java.io.InputStream in, java.io.OutputStream traceOut)
in
- the underlying input stream.out
- the trace streamMethod Detail |
---|
public void setTrace(boolean trace)
trace
- the trace modepublic void setQuote(boolean quote)
quote
- the quote modepublic int read() throws java.io.IOException
-1
if no data is available. Writes out the read
byte into the trace stream, if trace mode is true
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
len
bytes of data from this input stream
into an array of bytes. Returns -1
if no more data
is available. Writes out the read bytes into the trace stream, if
trace mode is true
read
in class java.io.FilterInputStream
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |