code: public static InputStream getResourceAsStream(String resource) throws IOException {
      InputStream in = null;
      ClassLoader loader = ResourcesUtils.class.getClassLoader();
      if (loader != null) {
        in = loader.getResourceAsStream(resource);
      }
      if (in == null) {
        in = ClassLoader.getSystemResourceAsStream(resource);
      }
      if (in == null) {
        throw new IOException("Could not find resource " + resource);
      }
      return in;
    }
docs: Returns a resource on the classpath as a Stream object
  
  @param resource The resource to find
  @throws IOException If the resource cannot be found or read
  @return The resource