code: public static InputStream loadFile(String fileName) {
          logger.entering(fileName);
          ClassLoader loader = Thread.currentThread().getContextClassLoader();
          InputStream iStream = loader.getResourceAsStream(fileName);
          if (iStream == null) {
              try {
                  iStream = new FileInputStream(fileName);
              } catch (FileNotFoundException e) { // NOSONAR
                  // Gobbling the checked exception here and doing nothing with it
                  // because we are explicitly checking if the inputstream is null
                  // and then throwing a runtime exception
              }
          }
          if (iStream == null) {
              throw new IllegalArgumentException("[" + fileName + "] is not a valid resource");
          }
          logger.exiting();
          return iStream;
      }
docs: Load a file resource via the {@link ClassLoader}
  
  @param fileName
  The name of the file
  @return An object of type {@link InputStream} that represents the stream of a file that was read from the file
  system.