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:
AbstractLayout
,AbstractStringLayout
,HtmlLayout
,LayoutAdapter
,LockingStringBuilderEncoder
,Log4j1XmlLayout
,MessageLayout
,PatternLayout
,Rfc5424Layout
,SerializedLayout
,StringBuilderEncoder
,SyslogLayout
public interface Encoder<T>
Objects implementing theEncoder
interface know how to convert an object to some binary representation and write the result to aByteBuffer
, ideally without creating temporary objects.- Since:
- 2.6
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
encode(T source, ByteBufferDestination destination)
Encodes the specified source object to some binary representation and writes the result to the specified destination.
-
-
-
Method Detail
-
encode
void encode(T source, ByteBufferDestination destination)
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.
-
-