code: private static String[] readFlagFile(String path) throws ParseException {
          Path p = Paths.get(path);
          if (!Files.isRegularFile(p)) {
              throw new ParseException("--flagfile specified a file that does not exist: " + path);
          }
          StringBuilder sb = new StringBuilder();
          try {
              for (String line : Files.readAllLines(p)) {
                  if (line.startsWith("#")) { continue; }
                  sb.append(line);
              }
          } catch (IOException e) {
              throw new ParseException("Error while reading flagfile: " + e.getMessage());
          }
          return sb.toString().split("\\s+");
      }
docs: Reads a flag file: skips lines beginning with # as comments and splits on whitespace.