code: public static InputStream openResourceStream(String resourceName) {
          InputStream stream = null;
          ClassLoader classLoader = Utils.class.getClassLoader();
          if (classLoader != null) {
              stream = classLoader.getResourceAsStream(resourceName);
          }
  
          if (stream == null) {
              stream = ClassLoader.getSystemResourceAsStream(resourceName);
          }
          return stream;
      }
docs: Open the resource stream for named resource.
  Stream must be closed by user after usage.
  
  @param resourceName resource name
  @return input stream