public class BodyTextEventSerializer extends Object implements EventSerializer
| Modifier and Type | Class and Description |
|---|---|
static class |
BodyTextEventSerializer.Builder |
CTX_PREFIX| Modifier and Type | Method and Description |
|---|---|
void |
afterCreate()
Hook to write a header after file is opened for the first time.
|
void |
afterReopen()
Hook to handle any framing needed when file is re-opened (for write).
Could have been named afterOpenForAppend(). |
void |
beforeClose()
Hook to write a trailer before the stream is closed.
|
void |
flush()
Hook to flush any internal write buffers to the underlying stream.
|
boolean |
supportsReopen()
Specify whether this output format supports reopening files for append.
|
void |
write(Event e)
Serialize and write the given event.
|
public boolean supportsReopen()
EventSerializerfalse if
EventSerializer.beforeClose() writes a trailer that "finalizes" the file
(this type of behavior is file format-specific).supportsAppend().supportsReopen in interface EventSerializerpublic void afterCreate()
EventSerializerafterCreate in interface EventSerializerpublic void afterReopen()
EventSerializerafterOpenForAppend().afterReopen in interface EventSerializerpublic void beforeClose()
EventSerializerbeforeClose in interface EventSerializerpublic void write(Event e) throws IOException
EventSerializerwrite in interface EventSerializere - Event to write to the underlying stream.IOExceptionpublic void flush()
throws IOException
EventSerializerflush in interface EventSerializerIOExceptionCopyright © 2009-2022 Apache Software Foundation. All Rights Reserved.