Package com.lucimber.dbus.codec.decoder
Class StructDecoder
java.lang.Object
com.lucimber.dbus.codec.decoder.StructDecoder
- All Implemented Interfaces:
Decoder<ByteBuffer,
DBusStruct>
A decoder which unmarshals a struct from the byte stream format used by D-Bus.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStructDecoder
(DBusSignature signature) Creates a new instance with mandatory parameters. -
Method Summary
Modifier and TypeMethodDescriptiondecode
(ByteBuffer buffer, int offset) Decodes a specific type from a buffer.
-
Constructor Details
-
StructDecoder
Creates a new instance with mandatory parameters.- Parameters:
signature
- aDBusSignature
; must describe a struct
-
-
Method Details
-
decode
Description copied from interface:Decoder
Decodes a specific type from a buffer.- Specified by:
decode
in interfaceDecoder<ByteBuffer,
DBusStruct> - Parameters:
buffer
- The buffer that contains the marshalled type.offset
- The number of bytes of a message, that have already been decoded.- Returns:
- The result of the decoding procedure.
- Throws:
DecoderException
- If the value could not be decoded successfully.
-