Interface Encoder<T>
- Type Parameters:
T- the type of objects that the Encoder can encode
- All Known Subinterfaces:
Layout<T>, StringLayout
- All Known Implementing Classes:
AbstractCsvLayout, AbstractJacksonLayout, AbstractLayout, AbstractStringLayout, CsvLogEventLayout, CsvParameterLayout, GelfLayout, HtmlLayout, JsonLayout, JsonTemplateLayout, JsonTemplateLayout.StringBuilderEncoder, LayoutAdapter, LockingStringBuilderEncoder, Log4j1SyslogLayout, Log4j1XmlLayout, MessageLayout, PatternLayout, Rfc5424Layout, SerializedLayout, StringBuilderEncoder, SyslogLayout, XmlLayout, YamlLayout
public interface Encoder<T>
Objects implementing the
Encoder interface know how to convert an object to some binary representation and
write the result to a ByteBuffer, ideally without creating temporary objects.- Since:
- 2.6
-
Method Summary
Modifier and TypeMethodDescriptionvoidencode(T source, ByteBufferDestination destination) Encodes the specified source object to some binary representation and writes the result to the specified destination.
-
Method Details
-
encode
Encodes the specified source object to some binary representation and writes the result to the specified destination.- Parameters:
source- the object to encode.destination- holds the ByteBuffer to write into.
-