Package com.lucimber.dbus.codec.encoder
Class Int64Encoder
java.lang.Object
com.lucimber.dbus.codec.encoder.Int64Encoder
- All Implemented Interfaces:
Encoder<DBusInt64,
ByteBuffer>
An encoder which encodes a 64-bit integer to the D-Bus marshalling format using ByteBuffer.
-
Constructor Summary
ConstructorsConstructorDescriptionInt64Encoder
(ByteOrder order) Constructs a new instance with mandatory parameter. -
Method Summary
Modifier and TypeMethodDescriptionEncodes a value into bytes.
-
Constructor Details
-
Int64Encoder
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<DBusInt64,
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.
-