Class ObjectUtils

    • Method Detail

      • serializeMap

        public static byte[] serializeMap​(Map<String,​Object> map)
                                   throws Exception
        Converts a map to a byte array for storage/serialization.
        Parameters:
        map - The Map to convert.
        Returns:
        A byte[] with the converted Map.
        Throws:
        Exception - A generic exception.
      • deserialize

        public static <T> T deserialize​(byte[] objectData)
        Deserializes a single object from an array of bytes.
        Type Parameters:
        T - type of the object to return
        Parameters:
        objectData - The serialized object.
        Returns:
        The deserialized object, or null on failure.