public class IntegerSerde extends java.lang.Object implements Serde<java.lang.Integer>
Constructor and Description |
---|
IntegerSerde() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
fromBytes(byte[] bytes)
Deserializes given serialized object from an array of bytes to its original form.
|
byte[] |
toBytes(java.lang.Integer obj)
Serializes given object to an array of bytes.
|
public byte[] toBytes(java.lang.Integer obj)
Serializer
toBytes
in interface Serializer<java.lang.Integer>
obj
- Object of specific type to serialize.public java.lang.Integer fromBytes(byte[] bytes)
Deserializer
fromBytes
in interface Deserializer<java.lang.Integer>
bytes
- Array of bytes representing serialized object.