Class SerializerUtil
java.lang.Object
org.identityconnectors.framework.common.serializer.SerializerUtil
Bag of utilities for serialization.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcloneObject(Object object) Clones the given object by serializing it to bytes and then deserializing it.static ObjectdeserializeBase64Object(String encdata) Deserializes the given object from Base64 String.static ObjectdeserializeBinaryObject(byte[] bytes) Deserializes the given object from bytes.static ObjectdeserializeXmlObject(String str, boolean validate) Deserializes the given object from xml.static StringserializeBase64Object(Object object) Serializes the given object to Base64 string.static byte[]serializeBinaryObject(Object object) Serializes the given object to bytes.static StringserializeXmlObject(Object object, boolean includeHeader) Serializes the given object to xml.
-
Method Details
-
serializeBinaryObject
Serializes the given object to bytes.- Parameters:
object- The object to serialize- Returns:
- The bytes
- See Also:
-
deserializeBinaryObject
Deserializes the given object from bytes.- Parameters:
bytes- The bytes to deserialize- Returns:
- The object
- See Also:
-
serializeBase64Object
Serializes the given object to Base64 string.- Parameters:
object- The object to serialize- Returns:
- The Base64 string
- Since:
- 1.4
- See Also:
-
deserializeBase64Object
Deserializes the given object from Base64 String.- Parameters:
encdata- The string to deserialize- Returns:
- The object
- Since:
- 1.4
- See Also:
-
serializeXmlObject
Serializes the given object to xml.- Parameters:
object- The object to serializeincludeHeader- True if we are to include the xml header.- Returns:
- The xml
- See Also:
-
deserializeXmlObject
Deserializes the given object from xml.- Parameters:
str- The xml to deserializevalidate- True if we are to validate the xml- Returns:
- The object
- See Also:
-
cloneObject
Clones the given object by serializing it to bytes and then deserializing it.- Parameters:
object- The object.- Returns:
- A clone of the object
-