public final class LogDecoder extends Object
LogDecoder decoder = new LogDecoder();
decoder.handle(...);
LogEvent event;
do
{
event = decoder.decode(buffer, context);
// process log event.
}
while (event != null);
// no more events in buffer.
| 构造器和说明 |
|---|
LogDecoder() |
LogDecoder(int fromIndex,
int toIndex) |
protected static final org.slf4j.Logger logger
protected final BitSet handleSet
public final void handle(int fromIndex,
int toIndex)
public final void handle(int flagIndex)
public LogEvent decode(LogBuffer buffer, LogContext context) throws IOException
UknownLogEvent if event type is unknown or skipped,
null if buffer is not including a full event.IOExceptionpublic static LogEvent decode(LogBuffer buffer, LogHeader header, LogContext context) throws IOException
UknownLogEvent if event type is unknown or skipped.IOExceptionCopyright © 2017. All rights reserved.