Package com.lucimber.dbus.codec.encoder
Class ObjectPathEncoder
java.lang.Object
com.lucimber.dbus.codec.encoder.ObjectPathEncoder
- All Implemented Interfaces:
Encoder<DBusObjectPath,
ByteBuffer>
An encoder which encodes an object path to the D-Bus marshalling format using ByteBuffer.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionObjectPathEncoder
(ByteOrder order) Constructs a new instance with mandatory parameter. -
Method Summary
Modifier and TypeMethodDescriptionencode
(DBusObjectPath value, int offset) Encodes a value into bytes.
-
Constructor Details
-
ObjectPathEncoder
Constructs a new instance with mandatory parameter.- Parameters:
order
- The byte order of the produced bytes.
-
-
Method Details
-
encode
Description copied from interface:Encoder
Encodes a value into bytes.- Specified by:
encode
in interfaceEncoder<DBusObjectPath,
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
EncoderResult
containing the marshalled representation of the value. - Throws:
EncoderException
- If the value could not have been encoded.
-