/*
(non-Javadoc)

@see org.beetl.core.ResourceLoader#getResource(java.lang.String)
174553
@Override
	public Resource getResource(String key)
	{

		Resource resource = new ClasspathResource(key, this.getChildPath(root, key), this);
		return resource;
	}
217113
public static URL getResource(String resource, Class<?> context)
    {
        return getResource(resource, context, false);
    }
692828
public static URL getResourceUrl(String resource, Class<?> baseClass) {
		return ResourceUtil.getResource(resource, baseClass);
	}
202271
public static String getResourceAsString(Class<?> clazz, String resource) throws IOException {
        try (InputStream inputStream = clazz.getResourceAsStream(resource)) {
            return IoUtils.toString(inputStream);
        }
    }
1349276
public Resource getResource(String name, Locale locale) throws IOException {
        return getResource(name, locale, null);
    }
925636
@Override
  public InputStream getResourceAsStream(String name)
  {
    ResourceEntry entry = _resourceCacheMap.get(name);
    
    if (entry == null || entry.isModified()) {
      URL resource = super.getResource(name);
    
      entry = new ResourceEntry(resource);
    
      _resourceCacheMap.put(name, entry);
    }
    
    return entry.getResourceAsStream();
  }
339810
private CmsResource getResource(CmsObject cms, String resourcename) {

        return getResource(cms, resourcename, CmsResourceFilter.DEFAULT);
    }
108244
public static @CheckForNull URL _findResource(ClassLoader cl, String name) {
        return (URL) invoke(FIND_RESOURCE, RuntimeException.class, cl, name);
    }
831298
public Resource getResource(String name, Locale locale, String encoding) throws IOException {
        name = UrlUtils.cleanName(name);
        locale = cleanLocale(locale);
        return loadResource(name, locale, encoding);
    }
403846
@Override
	public Reader getResource(JoinableResourceBundle bundle, String resourceName) {

		Reader rd = null;
		if (!jawrConfig.isDebugModeOn()) {
			((TextResourceReader) resourceReader).getResource(bundle, resourceName);
		}

		return rd;
	}
133766
public static String getResourceUri(String resourceName) {

        StringBuffer result = new StringBuffer(256);
        result.append(getSkinUri());
        result.append(resourceName);
        return result.toString();
    }
1106264
@Override
	public InputStream getResourceAsInputStream(String resourceName) throws IOException {

		try {
			return imgRsHandler.getResourceAsStream(resourceName);
		} catch (ResourceNotFoundException e) {
			throw new IOException("The resource '" + resourceName + "' was not found.");
		}
	}
839400
@Override
	public InputStream getResourceAsStream(String resourceName) {
		URL url = getResourceUrl(resourceName);
		if (url != null) {
			try {
				return url.openStream();
			} catch (IOException e) {
				throw new JKException(e);
			}
		}
		return null;
	}
675107
@Override
    public URL getResource(String name) {
        return name == null ? null : shadowedLoader.getResource(name);
    }
30491
public @NotNull List<Resource> getResources(@NotNull Resource baseResource) {
    return getResources((Predicate<Resource>)null, baseResource);
  }
665125
public static String getResourceURL(String resource) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        return cl.getResource(resource).toString();
    }
413902
@Override
    public Resource getResource(String path) {
	int index = path.indexOf("://");
	if (index != -1) {
	    String scheme = path.substring(0, index).toLowerCase().trim();
	    String subPath = path.substring(index + 3);
	    for (int i = 0; i < resources.length; i++) {
		if (scheme.equalsIgnoreCase(resources[i].getScheme())) {
		    return resources[i].instance().getResource(subPath);
		}
	    }
	}
	return defaultResource.getResource(path);
    }