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.OutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] buf,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionprotected abstract void dispatch(java.lang.String message)