| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Constructor Summary | |
---|---|
TraceOutputStream(OutputStream out, OutputStream traceOut) Creates an output stream filter built on top of the specified underlying output stream. |
Method Summary | |
---|---|
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.
|
Constructor Detail |
---|
public TraceOutputStream(OutputStream out, OutputStream traceOut)
out
- the underlying output stream.traceOut
- the trace stream.Method Detail |
---|
public void setQuote(boolean quote)
quote
- the quote modepublic void setTrace(boolean trace)
trace
public 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 true
write
in class FilterOutputStream
b
off
len
IOException
public void write(int b) throws IOException
byte
to this output stream.
Writes out the byte into the trace stream if the trace mode
is true
write
in class FilterOutputStream
b
IOException
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |