Package com.lucimber.dbus.codec.encoder
Class ByteEncoder
java.lang.Object
com.lucimber.dbus.codec.encoder.ByteEncoder
- All Implemented Interfaces:
Encoder<DBusByte,ByteBuffer>
An encoder which encodes a byte to the D-Bus marshalling format using ByteBuffer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEncodes a value into bytes.
-
Constructor Details
-
ByteEncoder
public ByteEncoder()
-
-
Method Details
-
encode
Description copied from interface:EncoderEncodes a value into bytes.- Specified by:
encodein interfaceEncoder<DBusByte,ByteBuffer> - Parameters:
value- The data type that needs to be encoded.offset- The byte count of already encoded bytes, which is necessary for alignment padding.- Returns:
- An
EncoderResultcontaining the marshalled representation of the value. - Throws:
EncoderException- If the value could not have been encoded.
-