Package com.lucimber.dbus.codec.encoder
Class EncoderUtils
java.lang.Object
com.lucimber.dbus.codec.encoder.EncoderUtils
Various methods used by the ByteBuffer-based implementations of the encoders.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EncoderResult<ByteBuffer>
Encodes a DBusType into its binary representation using ByteBuffer.
-
Method Details
-
encode
public static EncoderResult<ByteBuffer> encode(DBusType value, int offset, ByteOrder order) throws EncoderException Encodes a DBusType into its binary representation using ByteBuffer.- Parameters:
value
- the value to encodeoffset
- the offset where the value will be writtenorder
- byte order to use- Returns:
- an EncoderResult with the encoded buffer and byte count
- Throws:
EncoderException
- if the value cannot be encoded
-