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()
EventSerializer
false
if
EventSerializer.beforeClose()
writes a trailer that "finalizes" the file
(this type of behavior is file format-specific).supportsAppend()
.supportsReopen
in interface EventSerializer
public void afterCreate()
EventSerializer
afterCreate
in interface EventSerializer
public void afterReopen()
EventSerializer
afterOpenForAppend()
.afterReopen
in interface EventSerializer
public void beforeClose()
EventSerializer
beforeClose
in interface EventSerializer
public void write(Event e) throws IOException
EventSerializer
write
in interface EventSerializer
e
- Event to write to the underlying stream.IOException
public void flush() throws IOException
EventSerializer
flush
in interface EventSerializer
IOException
Copyright © 2009–2019 Apache Software Foundation. All rights reserved.