public class OxmSerializer extends Object implements InitializingBean, RedisSerializer<Object>
Marshaller
and Unmarshaller. Note:Null objects are serialized as empty arrays and vice versa.| Constructor and Description |
|---|
OxmSerializer() |
OxmSerializer(Marshaller marshaller,
Unmarshaller unmarshaller) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Object |
deserialize(byte[] bytes)
Deserialize an object from the given binary data.
|
byte[] |
serialize(Object t)
Serialize the given object to binary data.
|
void |
setMarshaller(Marshaller marshaller) |
void |
setUnmarshaller(Unmarshaller unmarshaller) |
public OxmSerializer()
public OxmSerializer(Marshaller marshaller, Unmarshaller unmarshaller)
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic void setMarshaller(Marshaller marshaller)
marshaller - The marshaller to set.public void setUnmarshaller(Unmarshaller unmarshaller)
unmarshaller - The unmarshaller to set.public Object deserialize(byte[] bytes) throws SerializationException
RedisSerializerdeserialize in interface RedisSerializer<Object>bytes - object binary representationSerializationExceptionpublic byte[] serialize(Object t) throws SerializationException
RedisSerializerserialize in interface RedisSerializer<Object>t - object to serializeSerializationException