public final class SerializerUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
cloneObject(java.lang.Object object)
Clones the given object by serializing it to bytes and then
deserializing it.
|
static java.lang.Object |
deserializeBinaryObject(byte[] bytes)
Deserializes the given object from bytes
|
static java.lang.Object |
deserializeXmlObject(java.lang.String str,
boolean validate)
Deserializes the given object from xml
|
static byte[] |
serializeBinaryObject(java.lang.Object object)
Serializes the given object to bytes
|
static java.lang.String |
serializeXmlObject(java.lang.Object object,
boolean includeHeader)
Serializes the given object to xml
|
public static byte[] serializeBinaryObject(java.lang.Object object)
object
- The object to serializefor a list of supported types
public static java.lang.Object deserializeBinaryObject(byte[] bytes)
bytes
- The bytes to deserializefor a list of supported types
public static java.lang.String serializeXmlObject(java.lang.Object object, boolean includeHeader)
object
- The object to serializeincludeHeader
- True if we are to include the xml header.for a list of supported types
public static java.lang.Object deserializeXmlObject(java.lang.String str, boolean validate)
str
- The xml to deserializevalidate
- True if we are to validate the xmlfor a list of supported types
public static java.lang.Object cloneObject(java.lang.Object object)
object
- The object.