public class ThreadBoundLogOutputStream<D,T extends LogBuffer<D>>
extends java.io.OutputStream
| Constructor and Description |
|---|
ThreadBoundLogOutputStream(java.util.function.Consumer<D> logger,
java.nio.charset.Charset charset,
java.util.function.Function<java.nio.charset.Charset,LogBufferManager<D,T>> factory)
Create a new thread local buffered stream
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
flushBuffers()
Flush all event buffers managed by the current manager
|
LogBufferManager<D,T> |
installManager()
Install a new inherited thread local buffer manager and return it
|
java.nio.charset.Charset |
setCharset(java.nio.charset.Charset charset)
Set the charset to use
|
void |
write(int b)
Write output
|
public ThreadBoundLogOutputStream(java.util.function.Consumer<D> logger, java.nio.charset.Charset charset, java.util.function.Function<java.nio.charset.Charset,LogBufferManager<D,T>> factory)
logger - logger for eventspublic java.nio.charset.Charset setCharset(java.nio.charset.Charset charset)
charset - new charsetpublic LogBufferManager<D,T> installManager()
public void write(int b)
write in class java.io.OutputStreamb - public void flushBuffers()
public void flush()
flush in interface java.io.Flushableflush in class java.io.OutputStreampublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOException