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,AbstractLayout,AbstractStringLayout,CsvLogEventLayout,CsvParameterLayout,GelfLayout,HtmlLayout,JsonLayout,LockingStringBuilderEncoder,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.
-