Package net.solarnetwork.codec
Interface ObjectEncoder
- All Superinterfaces:
Identifiable
- All Known Subinterfaces:
ObjectCodec
API for a service that can encode objects into alternate representations.
- Since:
- 1.69
- Version:
- 1.0
- Author:
- matt
- See Also:
-
Field Summary
Fields inherited from interface net.solarnetwork.service.Identifiable
GROUP_UID_PROPERTY, UID_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encodeAsBytes(Object obj, Map<String, ?> parameters) Encode an object into a byte array.Methods inherited from interface net.solarnetwork.service.Identifiable
getDisplayName, getGroupUid, getUid
-
Method Details
-
encodeAsBytes
Encode an object into a byte array.- Parameters:
obj- the object to encodeparameters- optional parameters to pass to the encoder- Returns:
- the bytes, never null
- Throws:
IOException- if an encoding problem occurs
-