Class JavaObjectSerializer

    • Constructor Detail

      • JavaObjectSerializer

        public JavaObjectSerializer()
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: TypedValueSerializer
        The name of this serializer. The name is used when persisting the ValueFields populated by this serializer.
        Returns:
        the name of this serializer.
      • deserializeFromByteArray

        protected java.lang.Object deserializeFromByteArray​(byte[] bytes,
                                                            java.lang.String objectTypeName)
                                                     throws java.lang.Exception
        Description copied from class: AbstractObjectValueSerializer
        Deserialize the object from a byte array.
        Specified by:
        deserializeFromByteArray in class AbstractObjectValueSerializer
        Parameters:
        bytes - the object to deserialize
        objectTypeName - the type name of the object to deserialize
        Returns:
        the deserialized object
        Throws:
        java.lang.Exception
      • serializeToByteArray

        protected byte[] serializeToByteArray​(java.lang.Object deserializedObject)
                                       throws java.lang.Exception
        Description copied from class: AbstractObjectValueSerializer
        Implementations must return a byte[] representation of the provided object. The object is guaranteed not to be null.
        Specified by:
        serializeToByteArray in class AbstractObjectValueSerializer
        Parameters:
        deserializedObject - the object to serialize
        Returns:
        the byte array value of the object
        Throws:
        java.lang.Exception
      • getTypeNameForDeserialized

        protected java.lang.String getTypeNameForDeserialized​(java.lang.Object deserializedObject)
        Description copied from class: AbstractObjectValueSerializer
        Returns the type name for the deserialized object.
        Specified by:
        getTypeNameForDeserialized in class AbstractObjectValueSerializer
        Parameters:
        deserializedObject - . Guaranteed not to be null
        Returns:
        the type name fot the object.