com.ezware.oxbow.swingbits.util
Class DeepCopy

java.lang.Object
  extended by com.ezware.oxbow.swingbits.util.DeepCopy

public class DeepCopy
extends Object

Utility for object deep copying (vs. clone()'s shallow copying)


Constructor Summary
DeepCopy()
           
 
Method Summary
static
<T extends Serializable>
T
copy(T originalObject)
          Creates deep copy of the object.
static
<T extends Serializable>
T
restore(FastByteArrayInputStream stream)
           
static
<T extends Serializable>
FastByteArrayOutputStream
store(T obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeepCopy

public DeepCopy()
Method Detail

copy

public static final <T extends Serializable> T copy(T originalObject)
Creates deep copy of the object.

Parameters:
originalObject - object to copy
Returns:
copy of originalObject
Throws:
DeepCopyException - if operation cannot be performed

store

public static final <T extends Serializable> FastByteArrayOutputStream store(T obj)

restore

public static final <T extends Serializable> T restore(FastByteArrayInputStream stream)


Copyright © 2011. All Rights Reserved.