protected Object cloneObject(Object obj){
  if (obj == null) {
    return null;
  }
  if (obj instanceof String || obj instanceof Boolean || obj instanceof Byte|| obj instanceof Short|| obj instanceof Character|| obj instanceof Integer|| obj instanceof Long|| obj instanceof Float|| obj instanceof Double) {
    return obj;
  }
  if (obj instanceof byte[]) {
    byte[] body=(byte[])obj;
    byte[] data=new byte[body.length];
    System.arraycopy(body,0,data,0,body.length);
    return data;
  }
  return SerializationHelper.deepClone(obj);
}

protected Object cloneObject ( Object obj ) { if ( obj == null ) { return null ; } if ( obj instanceof String || obj instanceof Boolean || obj instanceof Byte || obj instanceof Short || obj instanceof Character || obj instanceof Integer || obj instanceof Long || obj instanceof Float || obj instanceof Double ) { return obj ; } if ( obj instanceof byte [ ] ) { byte [ ] body = ( byte [ ] ) obj ; byte [ ] data = new byte [ body . length ] ; System . arraycopy ( body , 0 , data , 0 , body . length ) ; return data ; } return SerializationHelper . deepClone ( obj ) ; }
returns a clone of the object .
