code: public static InputStream loadInputStream(final String custConfFileName) {
          InputStream is = null;
          final File resourceFile = new File(custConfFileName);
          // Check if the file could be find
          if (resourceFile.exists()) {
              try {
                  is = new FileInputStream(resourceFile);
              } catch (final FileNotFoundException e) {
                  // Nothing to do
              }
          } else {
              // Otherwise try to load from context classloader
              is = Thread.currentThread().getContextClassLoader().getResourceAsStream(custConfFileName);
          }
  
          return is;
      }
docs: TRy to load a custom resource file.
  
  @param custConfFileName the custom resource file to load
  
  @return the load input stream