public class MessagePrinter<M extends Message> extends Object implements MessageReceiver<M>
flushed explicitly.| Modifier and Type | Class and Description |
|---|---|
static class |
MessagePrinter.Indenting<M extends Message>
Specialization of
MessagePrinter which indents all log messages. |
| Modifier and Type | Field and Description |
|---|---|
protected PrintWriter |
out |
protected Function<? super M,? extends String> |
toStr |
| Constructor and Description |
|---|
MessagePrinter()
Prints to
System.err, using default encoding. |
MessagePrinter(OutputStream os)
Prints to a newly created
PrintWriter to the OutputStream
provided.Consequenly using a default encoding. |
MessagePrinter(PrintWriter out)
|
| Modifier and Type | Method and Description |
|---|---|
void |
receive(M message)
|
void |
setMessageToString(Function<? super M,? extends String> toStr) |
protected final PrintWriter out
public MessagePrinter()
System.err, using default encoding.public MessagePrinter(OutputStream os)
PrintWriter to the OutputStream
provided.public MessagePrinter(PrintWriter out)
public void receive(M message)
Message.toString(). flushed explicitly.receive in interface MessageReceiver<M extends Message>see also the complete user documentation .