Vector resources = null; for (int i=0; i<pkgs.length; i++) { try { Enumeration results = pkgs[i].getExportingBundle().getResources(name); if (results != null) { if (resources == null) resources = new Vector(); while (results.hasMoreElements()) { Object url = results.nextElement(); if (!resources.contains(url)) resources.add(url); } } } catch (IOException e) {  } }  return resources == null ? null : resources.elements();
Enumeration results = null; for (int i = 0; i < pkgs.length; i++) { try { results = BundleLoader.compoundEnumerations(results, pkgs[i].getExportingBundle().getResources(name)); } catch (IOException e) {  } }  return results;
	public Enumeration loadResources(String name) {        //get all exported packages that match the resource's package		ExportedPackage[] pkgs = admin.getExportedPackages(BundleLoader.getResourcePackageName(name));		if (pkgs == null || pkgs.length == 0)			return null;                //get all matching resources for each package        Vector resources = null;        for (int i=0; i<pkgs.length; i++) {            try {                Enumeration results = pkgs[i].getExportingBundle().getResources(name);                if (results != null) {                    if (resources == null)                        resources = new Vector();                    while (results.hasMoreElements()) {                        Object url = results.nextElement();                        if (!resources.contains(url)) //avoid exact duplicates                            resources.add(url);                    }                }            }            catch (IOException e) {                //ignore IO problems and try next package            }        }                return resources == null ? null : resources.elements();	}