public class Outstream2Log<D> extends FilterOutputStream
PrintStream
got by {ink #printStream()}.
A Location
may be set for the very next generated log message by
sendLoc(Location)
.Modifier and Type | Field and Description |
---|---|
protected ByteArrayOutputStream |
bos |
protected Location<D> |
loc |
protected MessageReceiver<SimpleMessage<D>> |
receiver |
out
Constructor and Description |
---|
Outstream2Log(MessageReceiver<SimpleMessage<D>> drain) |
Outstream2Log(MessageReceiver<SimpleMessage<D>> drain,
Location<D> loc) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
doFlush(boolean isFinal) |
void |
flush() |
PrintStream |
printStream() |
void |
sendLoc(Location<D> loc) |
void |
write(byte[] c,
int a,
int b) |
write, write
protected final ByteArrayOutputStream bos
protected final MessageReceiver<SimpleMessage<D>> receiver
public Outstream2Log(MessageReceiver<SimpleMessage<D>> drain)
public Outstream2Log(MessageReceiver<SimpleMessage<D>> drain, Location<D> loc)
public PrintStream printStream()
public void write(byte[] c, int a, int b)
write
in class FilterOutputStream
public void flush()
flush
in interface Flushable
flush
in class FilterOutputStream
protected void doFlush(boolean isFinal)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterOutputStream
see also the complete user documentation .