code: public static List<String> readResourceAsLines(
              Class<?> classObj, String resourceName) throws IOException {
          InputStream in = getResourceAsStream(resourceName, classObj);
          try (BufferedReader buffer = new BufferedReader(new InputStreamReader(in))) {
              List<String> lines = new ArrayList<>();
              String line;
              while ((line = buffer.readLine()) != null) {
                  lines.add(line);
              }
              return lines;
          }
      }
docs: Reads everything from a textual resource as lines using the default
  character set.
  
  @param classObj the <code>Class</code> from which
  <code>Class.getResourceAsStream</code> is invoked. If <code>null</code>,
  will use <code>IOUtil.class</code>.
  @param resourceName a resource name <code>String</code>.
  @return a <code>String</code>, or <code>null</code> if
  <code>resourceName</code> is <code>null</code>.
  @return a {@link List<String>} containing the lines of the resource.
  @throws IOException if the resource cannot be found or if there is an
  error reading from it.