Websphere MQ Everyplace

com.ibm.mqe.trace
Class MQeTraceOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--com.ibm.mqe.trace.MQeTraceOutputStream

public final class MQeTraceOutputStream
extends java.io.OutputStream

An output stream which is capable of catching anything written to it, and pushing it into the MQeTrace mechanism.

Can be used to collect output from stdout, stderr, with the help of a PrintStreamWriter.

Each call to write() will cause a trace point to be logged to the MQeTrace class.

Each piece of data written will be tagged with the same trace point number.


Constructor Summary
MQeTraceOutputStream(long traceGroup, short tracePointNumber)
          Constructs an output stream which directs all output to the MQeTrace mechanism.
 
Method Summary
 void write(byte[] b)
          Over-rides part of the java.io.OutputStream class, to capture the output.
 void write(byte[] b, int off, int len)
          Over-rides part of the java.io.OutputStream class, to capture the output.
 void write(int b)
          Over-rides part of the java.io.OutputStream class, to capture the output.
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MQeTraceOutputStream

public MQeTraceOutputStream(long traceGroup,
                            short tracePointNumber)
Constructs an output stream which directs all output to the MQeTrace mechanism.

Parameters:
traceGroup - The MQeTrace group or groups to which output will be logged with.
tracePointNumber - The number to be associated with each piece of information written to the output stream.
Method Detail

write

public final void write(byte[] b)
Over-rides part of the java.io.OutputStream class, to capture the output.

Overrides:
write in class java.io.OutputStream

write

public final void write(byte[] b,
                        int off,
                        int len)
Over-rides part of the java.io.OutputStream class, to capture the output.

Overrides:
write in class java.io.OutputStream

write

public final void write(int b)
Over-rides part of the java.io.OutputStream class, to capture the output.

Specified by:
write in class java.io.OutputStream

Websphere MQ Everyplace