Returns an enumeration of URL objects representing all the resources with th given name.

Currently, WebSocketClassLoader returns only the first element.

@param name The name of a resource.
@return All founded resources.
511812
@Override
    protected Enumeration<URL> findResources(String name) {
        URL url = findResource(name);
        Vector<URL> urls = new Vector<>();
        if (url != null) {
            urls.add(url);
        }
        return urls.elements();
    }
847934
public static List<Object> getList(String name){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getList(name);
        }
        return null;
    }
1349484
public static InputStream getResourceAsStream(String name) {
		// try with caller classloader
		ClassLoader loader = getClassLoaderContextAt(3);
		InputStream in = (loader == null) ? null : loader.getResourceAsStream(name);
		if (in == null) {
			// try with context classloader if set & different
			ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
			if (contextLoader != null && contextLoader != loader) {
				in = contextLoader.getResourceAsStream(name);
			}
		}
		return in;
	}
694822
@Nullable
  public Object getSharedResource(@Nonnull final String name) {
    assertNotNull("Name is null", name);
    return sharedResources.get(name);
  }
729149
public final Iterable<URL> getResourcesURL(String name) {
		URL url = loadResourceURL(name);
		if (subLoaders == null)
			return url != null ? Collections.singletonList(url) : null;
		CompoundCollection<URL> list = new CompoundCollection<>();
		if (url != null) list.addSingleton(url);
		for (AbstractClassLoader sub : subLoaders) {
			Iterable<URL> urls = sub.getResourcesURL(name);
			if (urls != null) list.add(urls);
		}
		return list;
	}
73508
public Reader getConfResourceAsReader(String name) {
		try {
			URL url= getResource(name);

			if (url == null) {
				LOG.info(name + " not found");
				return null;
			} else {
				LOG.info("found resource " + name + " at " + url);
			}

			return new InputStreamReader(url.openStream(), Charsets.UTF_8);
		} catch (Exception e) {
			return null;
		}
	}
855599
public URL getResource(final String name) {
		final String normalizedName = Path.normalizeResourcePath(rootPath
				+ (name.startsWith("/") ? "" : "/") + name).trim();

		log.debug("Searching bundle " + bundle
						+ " for resource [{}], normalized to [{}]", name,
				normalizedName);

		URL url = resourceCache.get(normalizedName);

		if (url == null && !normalizedName.isEmpty()) {
			url = bundle.getEntry(normalizedName);
			if (url == null) {
				log.debug("getEntry failed, trying with /META-INF/resources/ in bundle class space");
				// Search attached bundles for web-fragments
				Set<Bundle> bundlesInClassSpace = ClassPathUtil.getBundlesInClassSpace(bundle, new HashSet<>());
				for (Bundle bundleInClassSpace : bundlesInClassSpace) {
					url = bundleInClassSpace.getEntry("/META-INF/resources/" + normalizedName);
					if (url != null) {
						break;
					}
				}
			}
			// obviously still not found might be available from a attached bundle resource
			if (url == null) {
				log.debug("getEntry failed, fallback to getResource");
				url = bundle.getResource(normalizedName);
			}
			if (url == null) {
				url = NO_URL;
			}
			resourceCache.putIfAbsent(normalizedName, url);
		}

		if (url != null && url != NO_URL) {
			log.debug("Resource found as url [{}]", url);
		} else {
			log.debug("Resource not found");
			url = null;
		}
		return url;
	}
1056425
public Enumeration<String> getValues(final String name) {
        for (int i = 0; i < _size; i++) {
            final HttpField f = _fields[i];

            if (f.getName().equalsIgnoreCase(name) && f.getValue() != null) {
                final int first = i;
                return new Enumeration<String>() {
                    HttpField field = f;
                    int i = first + 1;

                    @Override
                    public boolean hasMoreElements() {
                        if (field == null) {
                            while (i < _size) {
                                field = _fields[i++];
                                if (field.getName().equalsIgnoreCase(name) && field.getValue() != null)
                                    return true;
                            }
                            field = null;
                            return false;
                        }
                        return true;
                    }

                    @Override
                    public String nextElement() throws NoSuchElementException {
                        if (hasMoreElements()) {
                            String value = field.getValue();
                            field = null;
                            return value;
                        }
                        throw new NoSuchElementException();
                    }
                };
            }
        }

        List<String> empty = Collections.emptyList();
        return Collections.enumeration(empty);
    }
563593
public static boolean resourceExists(String name) {
        Objects.requireNonNull(name, Required.NAME.toString());
        
        URL resource = null;
        try {
            resource = Resources.getResource(name);            
        } catch (IllegalArgumentException e) { // NOSONAR Intentionally not logging or throwing this exception
           // Intentionally left blank
        }
        
        return resource != null;
    }
182398
public static Properties getPropertiesFromResource(final String name) throws Throwable {
    Properties pr = new Properties();
    InputStream is = null;

    try {
      try {
        // The jboss?? way - should work for others as well.
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        is = cl.getResourceAsStream(name);
      } catch (Throwable clt) {}

      if (is == null) {
        // Try another way
        is = Util.class.getResourceAsStream(name);
      }

      if (is == null) {
        throw new Exception("Unable to load properties file" + name);
      }

      pr.load(is);

      //if (debug) {
      //  pr.list(System.out);
      //  Logger.getLogger(Util.class).debug(
      //      "file.encoding=" + System.getProperty("file.encoding"));
      //}
      return pr;
    } finally {
      if (is != null) {
        try {
          is.close();
        } catch (Throwable t1) {}
      }
    }
  }
1266296
@Override
    public Enumeration<URL> findResources(final String name) throws IOException
    {
        return AccessController.doPrivileged(new PrivilegedAction<Enumeration<URL>>()
        {
            @Override
            public Enumeration<URL> run()
            {
                return URIClassLoader.this.finder.findResources(name);
            }
        }, this.acc);
    }
613286
public URL getResource(String name)
    {
        URL url= null;
        boolean tried_parent= false;
        if (_parent!=null &&(_java2compliant || isSystemPath(name)))
        {
            if (log.isTraceEnabled())
                log.trace("try getResource " + name + " from " + _parent);
            tried_parent= true;
            url= _parent.getResource(name);
        }

        if (url == null)
        {
            if (log.isTraceEnabled())
                log.trace("try findResource " + name + " from " + _urlClassPath);
            url= this.findResource(name);

            if (url == null && name.startsWith("/"))
            {
                if (log.isDebugEnabled())
                    log.debug("HACK leading / off " + name);
                url= this.findResource(name.substring(1));
            }
        }

        if (_parent!=null && url == null && !tried_parent)
        {
            if (log.isTraceEnabled())
                log.trace("try getResource " + name + " from " + _parent);
            url= _parent.getResource(name);
        }

        if (url != null)
            if (log.isTraceEnabled())
                log.trace("found " + url);

        return url;
    }
333964
@Override
    protected URL getURL(String name) {
        return Thread.currentThread().getContextClassLoader().getResource(name);
    }
966303
public String[] getHeaders(String name) {
        List<String> headerList = httpRequest.headers().getAll(name);
        return headerList.toArray(new String[0]);
    }
37845
@Override
	public Set<String> getResourcePaths(final String name) {
		final String normalizedname = Path.normalizeResourcePath(name);
		LOG.debug("Searching bundle [" + bundle + "] for resource paths of ["
				+ normalizedname + "]");
		final Enumeration<String> entryPaths = bundle
				.getEntryPaths(normalizedname);
		if (entryPaths == null || !entryPaths.hasMoreElements()) {
			return null;
		}
		Set<String> foundPaths = new HashSet<>();
		while (entryPaths.hasMoreElements()) {
			foundPaths.add(entryPaths.nextElement());
		}
		return foundPaths;
	}
379330
public Resource getResource(String name, String encoding) throws IOException {
        return getResource(name, null, encoding);
    }
647961
private URL findResourceCommonLibraryClassLoaders(String name) {
        for (LibertyLoader cl : delegateLoaders) {
            URL url = cl.findResource(name);
            if (url != null) {
                return url;
            }
        }
        // If we reached here, then the resource was not found.
        return null;
    }