E
- event type parameterpublic class BufferedOutputStreamAppender<E> extends OutputStreamAppender<E>
encoder, lock
name, started
context
Constructor and Description |
---|
BufferedOutputStreamAppender() |
Modifier and Type | Method and Description |
---|---|
protected void |
append(E eventObject) |
int |
getLength()
Returns the number of bytes buffered so far.
|
int |
getLimit()
Returns current value of
limit . |
void |
setLimit(int limit)
Sets a new value for
limit . |
void |
start() |
byte[] |
toByteArray()
Returns a concatenated buffered records.
|
String |
toString(Charset charset)
Returns a string representing buffered records.
|
void |
write(OutputStream output)
Writes buffered records to specified
otuput . |
closeOutputStream, getEncoder, getOutputStream, setEncoder, setLayout, setOutputStream, stop, subAppend, writeOut
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public void start()
start
in interface LifeCycle
start
in class OutputStreamAppender<E>
protected void append(E eventObject)
append
in class OutputStreamAppender<E>
public void write(OutputStream output) throws IOException
otuput
.output
- the output stream to which buffered records are written.IOException
- if an I/O error occurs.public byte[] toByteArray()
public String toString(Charset charset)
charset
- the charset to encode.toByteArray()
public int getLimit()
limit
.limit
.public void setLimit(int limit)
limit
.limit
- new value of limit
. Negative value for no limit.public int getLength()
Copyright © 2014–2015. All rights reserved.