code: public static BufferedReader resource(String resourcePath) throws IOException {
          InputStream is = IOUtils.class.getClassLoader().getResourceAsStream(resourcePath);
          if(is != null) {
              return new BufferedReader(new InputStreamReader(is, UTF_8));
          } else {
              File file = new File(resourcePath);
              if(file.exists()) {
                  return fileReader(file);
              } else {
                  throw new IllegalArgumentException("resource does not exist " + resourcePath);
              }
          }
      }
docs: Read a resource from the classpath or fallback to treating it as a file.
  @param resourcePath resource path inside your jar, or a path to an actual file
  @return BufferedReader
  @throws IOException if something goes wrong with the stream