org.ourgrid.common.util
Class StreamCloner

java.lang.Object
  extended by org.ourgrid.common.util.StreamCloner

public class StreamCloner
extends java.lang.Object

Class used to clone objects through stream writing and reading.


Constructor Summary
StreamCloner()
           
 
Method Summary
static
<T extends java.io.Serializable>
T
clone(T objectToBeCloned)
          Clones the given object through stream writing and reading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamCloner

public StreamCloner()
Method Detail

clone

public static <T extends java.io.Serializable> T clone(T objectToBeCloned)
                                            throws java.lang.CloneNotSupportedException
Clones the given object through stream writing and reading.

Parameters:
objectToBeCloned - The object to be cloned
Returns:
The cloned object
Throws:
java.lang.CloneNotSupportedException - If some object involved in the cloning operation does not implement the java.io.Serializable interface.