Class SerializationUtil


  • public class SerializationUtil
    extends Object
    Provides utility methods for serializing and deserializing.
    Author:
    Bill Branan
    • Method Detail

      • serializeMap

        public static String serializeMap​(Map<String,​String> map)
        Serializes a Map to XML. If the map is either empty or null the XML will indicate an empty map.
        Parameters:
        map -
        Returns:
      • deserializeMap

        public static Map<String,​String> deserializeMap​(String map)
        DeSerializes XML into a Map. If the XML is either empty or null an empty Map is returned.
        Parameters:
        map -
        Returns:
      • serializeList

        public static String serializeList​(List<?> list)
        Serializes a List to XML. If the list is either empty or null the XML will indicate an empty list.
        Parameters:
        list -
        Returns:
      • deserializeList

        public static List<String> deserializeList​(String list)
        DeSerializes XML into a List of Strings. If the XML is either empty or null an empty List is returned.
        Parameters:
        list -
        Returns:
      • serializeSet

        public static String serializeSet​(Set<?> set)
        Serializes a List to XML. If the list is either empty or null the XML will indicate an empty list.
        Parameters:
        set - of Strings
        Returns:
        serialized Set
      • deserializeSet

        public static Set<String> deserializeSet​(String set)
        DeSerializes XML into a Set of Strings. If the XML is either empty or null an empty List is returned.
        Parameters:
        set - serialized as a String
        Returns:
        deserialized Set