Package org.duracloud.common.util
Class SerializationUtil
java.lang.Object
org.duracloud.common.util.SerializationUtil
Provides utility methods for serializing and deserializing.
- Author:
- Bill Branan
-
Method Summary
Modifier and TypeMethodDescriptiondeserializeList(String list) DeSerializes XML into a List of Strings.deserializeMap(String map) DeSerializes XML into a Map.deserializeSet(String set) DeSerializes XML into a Set of Strings.static StringserializeList(List<?> list) Serializes a List to XML.static StringserializeMap(Map<String, String> map) Serializes a Map to XML.static StringserializeSet(Set<?> set) Serializes a List to XML.
-
Method Details
-
serializeMap
Serializes a Map to XML. If the map is either empty or null the XML will indicate an empty map.- Parameters:
map-- Returns:
-
deserializeMap
DeSerializes XML into a Map. If the XML is either empty or null an empty Map is returned.- Parameters:
map-- Returns:
-
serializeList
Serializes a List to XML. If the list is either empty or null the XML will indicate an empty list.- Parameters:
list-- Returns:
-
deserializeList
DeSerializes XML into a List of Strings. If the XML is either empty or null an empty List is returned.- Parameters:
list-- Returns:
-
serializeSet
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
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
-