code: public static InputStream getInputStreamForPath(String resourcePath) throws IOException {
  
          InputStream is;
          if (resourcePath.startsWith(CLASSPATH_PREFIX)) {
              is = loadFromClassPath(stripPrefix(resourcePath));
  
          } else if (resourcePath.startsWith(URL_PREFIX)) {
              is = loadFromUrl(stripPrefix(resourcePath));
  
          } else if (resourcePath.startsWith(FILE_PREFIX)) {
              is = loadFromFile(stripPrefix(resourcePath));
  
          } else {
              is = loadFromFile(resourcePath);
          }
  
          if (is == null) {
              throw new IOException("Resource [" + resourcePath + "] could not be found.");
          }
  
          return is;
      }
docs: Returns the InputStream for the resource represented by the specified path, supporting scheme
  prefixes that direct how to acquire the input stream
  ({@link #CLASSPATH_PREFIX CLASSPATH_PREFIX},
  {@link #URL_PREFIX URL_PREFIX}, or {@link #FILE_PREFIX FILE_PREFIX}).  If the path is not prefixed by one
  of these schemes, the path is assumed to be a file-based path that can be loaded with a
  {@link java.io.FileInputStream FileInputStream}.
  
  @param resourcePath the String path representing the resource to obtain.
  @return the InputStream for the specified resource.
  @throws IOException if there is a problem acquiring the resource at the specified path.