ioObjects[index] = ((DataObject) i.next()).asIObject();
o = gateway.findIObject(((DataObject) i.next()).asIObject()); ioObjects[index] = o;
    public Set removeDataObjects(Set children, DataObject parent)            throws DSOutOfServiceException, DSAccessException    {        if (children == null)             throw new IllegalArgumentException("The children cannot be null.");        if (children.size() == 0)             throw new IllegalArgumentException("No children to remove.");        Iterator i = children.iterator();        if (parent == null) {            int index = 0;            IObject[] ioObjects  = new IObject[children.size()];            while (i.hasNext()) {                ioObjects[index] = ((DataObject) i.next()).asIObject();                index++;            }            gateway.deleteObjects(ioObjects);        } else {            cut(parent, children);        }        return children;    }