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 object
      byte[] 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 here
        compress - compress data
        base64 - base64 encode data
        digest - create a message digest for later verification
        digestSalt - salt for the message digest (can be compared to a password in this context), leave null if digest is false
        digestConsumer - 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 here
        decompress - decompress data
        base64 - base64 decode data
        checkDigest - 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 false
        digestCheckConsumer - consumer to receive the verification result