Returns the Css path from the resource name

@param resourceName
the resource name
@return the Css path
179341
protected String getCssPath(String resourceName) {
		String path = resourceName;
		if (jawrConfig.getGeneratorRegistry().isPathGenerated(path)) {
			path = path.replace(':', '/');
			path = JawrConstant.SPRITE_GENERATED_CSS_DIR + path;
		}
		return path;
	}
735530
protected String resourceName(final String className) {
    String name = className;

    if (!name.startsWith("/")) {
      name = "/" + name;
    }

    if (!name.endsWith(DOT_GROOVY)) {
      name = name.replace('.', '/');
      name += DOT_GROOVY;
    }

    return name;
  }
40308
public InputStream getResourceAsStream(String resourceName) {
		InputStream is = null;
		String realPath = getRealResourcePath(resourceName);
		if (isFileSystemPath(resourceName, realPath)) { // The resource has been
														// remapped to a file
														// system path
			try {
				is = new FileInputStream(realPath);
			} catch (FileNotFoundException e) {
				LOGGER.debug("The resource " + realPath + " has not been found");
			}
		}
		if (is == null) {
			is = super.getResourceAsStream(realPath);
		}
		return is;
	}
797061
public static String colorizeResource(FileResource<?> resource)
   {
      String name = resource.getName();
      if (resource.isDirectory())
      {
         name = new TerminalString(name, new TerminalColor(Color.BLUE, Color.DEFAULT)).toString();
      }
      else if (resource.isExecutable())
      {
         name = new TerminalString(name, new TerminalColor(Color.GREEN, Color.DEFAULT)).toString();
      }
      return name;
   }
840770
protected String trimResourceName(String resourceName) {

        if (resourceName.startsWith("/")) {
            resourceName = resourceName.substring(1);
        }
        if (resourceName.endsWith("/")) {
            resourceName = resourceName.substring(0, resourceName.length() - 1);
        }
        return resourceName;
    }
14062
public static String getResourcePath(String resource) {
		String path = null;
		ClassLoader[] loaders = getClassLoaders(null);
		for (int i = 0; i < loaders.length; i++) {
			if (loaders[i] != null) {
				try {
					path = loaders[i].getResource(resource).getPath();
					if (StringUtils.isNotBlank(path)) {
						return path;
					}
				} catch (NullPointerException e) {

				}
			}
		}
		return path;
	}
927176
@Override
	public Set<String> getResourceNames(String path) {

		String resourcePath = getResolver().getResourcePath(path);
		return rsBrowser.getResourceNames(resourcePath);
	}
826106
@Override
	public String getFilePath(String resourcePath) {

		String filePath = null;
		List<ResourceBrowser> list = new ArrayList<>();
		list.addAll(resourceInfoProviders);
		for (Iterator<ResourceBrowser> iterator = list.iterator(); iterator.hasNext() && filePath == null;) {
			ResourceBrowser rsBrowser = iterator.next();
			if (generatorRegistry.isPathGenerated(resourcePath)) {
				if (rsBrowser instanceof ResourceGenerator) {
					ResourceGenerator rsGeneratorBrowser = (ResourceGenerator) rsBrowser;
					if (rsGeneratorBrowser.getResolver().matchPath(resourcePath)) {
						filePath = rsBrowser.getFilePath(resourcePath);
					}
				}
			} else {
				if (!(rsBrowser instanceof ResourceGenerator)) {
					filePath = rsBrowser.getFilePath(resourcePath);
				}
			}
		}
		return filePath;
	}
695316
public static String getPathForResource(final String resourcePath) {
        URL path = ResourceUtil.class.getResource(resourcePath);
        if (path == null) {
            path = ResourceUtil.class.getResource("/");
            File tmpFile = new File(path.getPath(), resourcePath);
            return tmpFile.getPath();
        }

        return path.getPath();
    }
478725
public static String getClassName(String resourceName) {
    if (!resourceName.endsWith(".class")) {
      throw new IllegalArgumentException("resourceName does not refer to a class");
    }
    int len = resourceName.length();
    return resourceName.substring(0, len - 6).replace('/', '.');
  }
639492
public static synchronized File extractTessResources(String resourceName) {
        File targetPath = null;

        try {
            targetPath = new File(TESS4J_TEMP_DIR, resourceName);

            Enumeration<URL> resources = LoadLibs.class.getClassLoader().getResources(resourceName);
            while (resources.hasMoreElements()) {
                URL resourceUrl = resources.nextElement();
                copyResources(resourceUrl, targetPath);
            }
        } catch (IOException | URISyntaxException e) {
            logger.warn(e.getMessage(), e);
        }

        return targetPath;
    }
339810
private CmsResource getResource(CmsObject cms, String resourcename) {

        return getResource(cms, resourcename, CmsResourceFilter.DEFAULT);
    }
1363073
protected boolean isInvalidResourceName(String resourceName) {

        if (resourceName == null) {
            return true;
        }
        try {

            m_cms.readResource(resourceName);
            return false;
        } catch (CmsException e) {
            //Ok, resource not valid..
        }
        return true;
    }
834430
public static Collection<BaseStyler> findForCssName(String cssName) throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
         return findForCssName(cssName, false);
   }
673191
@Override
	protected String getRewrittenImagePath(String originalCssPath, String newCssPath, String url) throws IOException {

		String imgUrl = null;

		// Retrieve the current CSS file from which the CSS image is referenced
		String currentCss = originalCssPath;
		boolean generatedImg = false;
		if (binaryRsHandler != null) {
			GeneratorRegistry imgRsGeneratorRegistry = binaryRsHandler.getConfig().getGeneratorRegistry();
			generatedImg = imgRsGeneratorRegistry.isGeneratedBinaryResource(url);
		}

		boolean cssGeneratorIsHandleCssImage = isCssGeneratorHandlingCssImage(currentCss);

		String rootPath = currentCss;

		// If the CSS image is taken from the classpath, add the classpath cache
		// prefix
		if (generatedImg || cssGeneratorIsHandleCssImage) {

			String tempUrl = url;

			// If it's a classpath CSS, the url of the CSS image is defined
			// relatively to it.
			if (cssGeneratorIsHandleCssImage && !generatedImg) {
				tempUrl = PathNormalizer.concatWebPath(rootPath, url);
			}

			// generate image cache URL
			imgUrl = rewriteURL(tempUrl, binaryServletPath, newCssPath, binaryRsHandler);
		} else {

			if (config.getGeneratorRegistry().isPathGenerated(rootPath)) {
				rootPath = rootPath.substring(rootPath.indexOf(GeneratorRegistry.PREFIX_SEPARATOR) + 1);
			}

			// Generate the image URL from the current CSS path
			imgUrl = PathNormalizer.concatWebPath(rootPath, url);
			imgUrl = rewriteURL(imgUrl, binaryServletPath, newCssPath, binaryRsHandler);
		}

		// This following condition should never be true.
		// If it does, it means that the image path is wrongly defined.
		if (imgUrl == null) {
			LOGGER.error("The CSS image path for '" + url + "' defined in '" + currentCss
					+ "' is out of the application context. Please check your CSS file.");
		}

		return imgUrl;
	}
245207
public Resource _getResource(String name) {
	Resource f = directory.getRealResource(name);
	if (f != null && f.exists() && f.isFile()) return f;
	return null;
    }
959187
public URL getResource(String name)
  {
    Path path;

    path = getPath(name);

    if (path != null && path.exists()) {
      try {
        return path.getNetURL();
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }
    }

    return null;
  }