Interface ObjectSerialization
-
public interface ObjectSerialization
ObjectSerialization provides utility methods to (de-)serialize data
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
deserialize(byte[] data, boolean deserializeObjRefs, boolean decompress, boolean base64, byte[] checkDigest, byte[] digestSalt, Consumer<Boolean> digestCheckConsumer)
Deserializes an objectbyte[]
serialize(Object o, boolean serializeObjRefs, boolean compress, boolean base64, boolean digest, byte[] digestSalt, Consumer<byte[]> digestConsumer)
Serializes an object
-
-
-
Method Detail
-
serialize
byte[] serialize(Object o, boolean serializeObjRefs, boolean compress, boolean base64, boolean digest, byte[] digestSalt, Consumer<byte[]> digestConsumer)
Serializes an object- Parameters:
serializeObjRefs
- Keep references to the same instance of members instead of serializing like separate instances, usually you want to pass false herecompress
- compress database64
- base64 encode datadigest
- create a message digest for later verificationdigestSalt
- salt for the message digest (can be compared to a password in this context), leave null if digest is falsedigestConsumer
- consumer to receive the digest
-
deserialize
Object deserialize(byte[] data, boolean deserializeObjRefs, boolean decompress, boolean base64, byte[] checkDigest, byte[] digestSalt, Consumer<Boolean> digestCheckConsumer)
Deserializes an object- Parameters:
deserializeObjRefs
- Keep references to the same instance of members instead of deserializing separate instances, usually you want to pass false heredecompress
- decompress database64
- base64 decode datacheckDigest
- verify a message digest (pass the original digest here)digestSalt
- salt for the message digest (can be compared to a password in this context), leave null if digest is falsedigestCheckConsumer
- consumer to receive the verification result
-
-