public abstract class AbstractLoggingOutput
extends java.io.OutputStream
The internal buffer is synchronised so this class is thread safe, however no synchronisation occurs between writing to the underlying stream and the log so output could be in a different order.
Constructor and Description |
---|
AbstractLoggingOutput(java.io.OutputStream existing)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
dispatch(java.lang.String message) |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int c) |
public AbstractLoggingOutput(java.io.OutputStream existing)
existing
- The output stream to also write to. May be null.public void write(int c) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
protected abstract void dispatch(java.lang.String message)