public abstract class MStreamSink extends MSink
This class is based on java.io.PrintStream
.
m_registry
Modifier | Constructor and Description |
---|---|
protected |
MStreamSink(MComponentRegistry registry,
java.lang.String name,
java.io.PrintStream stream)
Create a named instance of an
MStreamSink . |
Modifier and Type | Method and Description |
---|---|
void |
write(java.lang.String msg,
boolean flush)
Write the specified string to the output stream.
|
void |
write(java.lang.String msgPrefix,
MTree tree,
boolean flush)
Write the specified string to the output stream.
|
closeSink, flushSink, toString, write, write, write, write
activate, deactivate, getComponentRegistry, getName, getStatus, isActivated, remove
protected MStreamSink(MComponentRegistry registry, java.lang.String name, java.io.PrintStream stream)
MStreamSink
.registry
- Component registry to which this sink will belong.name
- Name of this MStreamSink
.stream
- I/O stream with which this sink will be associated.public void write(java.lang.String msg, boolean flush)
public void write(java.lang.String msgPrefix, MTree tree, boolean flush)
MTree
object to this sink.
It also allows you to specify a message prefix.