code: public static Resource[] listResources(Resource[] resources, ResourceFilter filter) {
  	int count = 0;
  	Resource[] children;
  	ArrayList<Resource[]> list = new ArrayList<Resource[]>();
  	for (int i = 0; i < resources.length; i++) {
  	    children = filter == null ? resources[i].listResources() : resources[i].listResources(filter);
  	    if (children != null) {
  		count += children.length;
  		list.add(children);
  	    }
  	    else list.add(new Resource[0]);
  	}
  	Resource[] rtn = new Resource[count];
  	int index = 0;
  	for (int i = 0; i < resources.length; i++) {
  	    children = list.get(i);
  	    for (int y = 0; y < children.length; y++) {
  		rtn[index++] = children[y];
  	    }
  	}
  	// print.out(rtn);
  	return rtn;
      }
docs: list children of all given resources
  
  @param resources
  @return