Class JavaSerializer

  • All Implemented Interfaces:
    ISerializer
    Direct Known Subclasses:
    DeflatedJavaSerializer

    public class JavaSerializer
    extends Object
    implements ISerializer
    An implementation of ISerializer based on Java Serialization (ObjectOutputStream, ObjectInputStream) Requires the application key to enable serialization and deserialisation outside thread in which application thread local is set
    • Constructor Detail

      • JavaSerializer

        public JavaSerializer​(String applicationKey)
        Construct.
        Parameters:
        applicationKey - the name of the application
    • Method Detail

      • serialize

        public byte[] serialize​(Object object)
        Description copied from interface: ISerializer
        Converts the object to byte array
        Specified by:
        serialize in interface ISerializer
        Parameters:
        object - the object to serialize
        Returns:
        the serialized page as byte array
      • deserialize

        public Object deserialize​(byte[] data)
        Description copied from interface: ISerializer
        Reconstructs the object from its serialized state
        Specified by:
        deserialize in interface ISerializer
        Parameters:
        data - the serialized state of the object
        Returns:
        the object reconstructed from its serialized state