Package com.lucimber.dbus.codec.encoder


package com.lucimber.dbus.codec.encoder
D-Bus message encoding infrastructure for converting Java objects to wire format.

This package provides encoders for all D-Bus types, handling the marshalling of strongly-typed Java objects into the binary D-Bus wire protocol format. The encoders support both big-endian and little-endian byte ordering, with proper alignment and padding according to the D-Bus specification.

Getting Started

For first-time users: This package is primarily used internally by the framework. Most users won't interact with encoders directly. To create D-Bus messages, use the builder classes in com.lucimber.dbus.message package instead.

Key components include:

  • Encoder - Base encoder interface
  • EncoderFactory - Factory for creating type-specific encoders
  • Type-specific encoders for all D-Bus basic and container types
  • Automatic alignment and padding calculation
See Also:
  • Class
    Description
    An encoder which encodes an array to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a boolean to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a byte to the D-Bus marshalling format using ByteBuffer.
    Default implementation of EncoderFactory that provides encoders for all standard D-Bus types.
    Functional interface for creating encoders with a given byte order.
    DictEncoder<KeyT extends DBusBasicType,ValueT extends DBusType>
    An encoder which encodes a dictionary to the D-Bus marshalling format using ByteBuffer.
    DictEntryEncoder<KeyT extends DBusBasicType,ValueT extends DBusType>
    An encoder which encodes a key-value pair to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a double to the D-Bus marshalling format using ByteBuffer.
    Encoder<ValueT,BufferT>
    Encodes D-Bus types into their marshalled representation.
    A RuntimeException that gets thrown by an Encoder, if the encoding of a value isn't possible.
    Factory interface for creating D-Bus encoders.
    EncoderResult<BufferT>
    The EncoderResult class yields the encoded D-Bus data type and the number of encoded bytes.
    Default implementation of the EncoderResult interface.
    Various methods used by the ByteBuffer-based implementations of the encoders.
    An encoder which encodes a short to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a 32-bit integer to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a 64-bit integer to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes an object path to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a signature to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a string to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a struct to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes an unsigned 16-bit integer to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes an unsigned 32-bit integer to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes an unsigned 64-bit integer to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a file-descriptor to the D-Bus marshalling format using ByteBuffer.
    An encoder which encodes a variant to the D-Bus marshalling format using ByteBuffer.