static public Object deepCopy(Object oldObj, boolean cloneVars) { deepCloneVars = cloneVars;  ObjectOutputStream oos = null; ObjectInputStream ois = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(bos);  oos.writeObject(oldObj); oos.flush(); ByteArrayInputStream bin = new ByteArrayInputStream(bos.toByteArray()); ois = new ObjectInputStream(bin);  oos.close(); ois.close(); return ois.readObject(); } catch(Exception e) { System.err.println("Exception in ObjectCloner = " + e); e.printStackTrace(); System.exit(-1);  } return null;
static public Object deepCopy(JPhylum oldObj, boolean cloneVars) { setOutsideParent(oldObj); return doCopy(oldObj, cloneVars);
    static public Object deepCopy(Object oldObj, boolean cloneVars)    {	deepCloneVars = cloneVars;       	ObjectOutputStream oos = null;	ObjectInputStream ois = null;	try	    {		ByteArrayOutputStream bos = 		    new ByteArrayOutputStream();		oos = new ObjectOutputStream(bos);		// serialize and pass the object		oos.writeObject(oldObj);  		oos.flush();              		ByteArrayInputStream bin = 		    new ByteArrayInputStream(bos.toByteArray()); 		ois = new ObjectInputStream(bin);                  		// return the new object		oos.close();		ois.close();		return ois.readObject(); 	    }	catch(Exception e)	    {		System.err.println("Exception in ObjectCloner = " + e);		e.printStackTrace();		System.exit(-1);	 	    }	return null;    }