code: public static File getClasspathFile(String filename, ClassLoader classLoader) {
      if(filename == null) {
        throw LOG.nullParameter("filename");
      }
  
      URL fileUrl = null;
  
      if (classLoader != null) {
        fileUrl = classLoader.getResource(filename);
      }
      if (fileUrl == null) {
        // Try the current Thread context classloader
        classLoader = Thread.currentThread().getContextClassLoader();
        fileUrl = classLoader.getResource(filename);
  
        if (fileUrl == null) {
          // Finally, try the classloader for this class
          classLoader = IoUtil.class.getClassLoader();
          fileUrl = classLoader.getResource(filename);
        }
      }
  
      if(fileUrl == null) {
        throw LOG.fileNotFoundException(filename);
      }
  
      try {
        return new File(fileUrl.toURI());
      } catch(URISyntaxException e) {
        throw LOG.fileNotFoundException(filename, e);
      }
    }
docs: Returns the {@link File} for a filename.
  
  @param filename the filename to load
  @param classLoader the classLoader to load file with, if null falls back to TCCL and then this class's classloader
  @return the file object
  @throws IoUtilException if the file cannot be loaded