Class EncoderUtils

java.lang.Object
com.lucimber.dbus.codec.encoder.EncoderUtils

public final class EncoderUtils extends Object
Various methods used by the ByteBuffer-based implementations of the encoders.
  • 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 encode
      offset - the offset where the value will be written
      order - byte order to use
      Returns:
      an EncoderResult with the encoded buffer and byte count
      Throws:
      EncoderException - if the value cannot be encoded