com.datumbox.framework.storage.inmemory
Class DeepCopy
- java.lang.Object
-
- com.datumbox.framework.storage.inmemory.DeepCopy
-
public class DeepCopy extends java.lang.ObjectCreates a Deep Copy of an object by serializing and deserializing it.
-
-
Constructor Summary
Constructors Constructor and Description DeepCopy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static <T> Tclone(T obj)Deep clone Object by serialization and deserialization.static java.lang.Objectdeserialize(byte[] arr)Deserializes the byte array.static byte[]serialize(java.lang.Object obj)Serialized the Object to byte array.
-
-
-
Method Detail
-
serialize
public static byte[] serialize(java.lang.Object obj)
Serialized the Object to byte array.- Parameters:
obj-- Returns:
-
deserialize
public static java.lang.Object deserialize(byte[] arr)
Deserializes the byte array.- Parameters:
arr-- Returns:
-
clone
public static <T> T clone(T obj)
Deep clone Object by serialization and deserialization.- Type Parameters:
T-- Parameters:
obj-- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG