code: private List<String> readFile(File file) throws Exception {
          List<String> content = new ArrayList<>(100);
          try (BufferedReader is = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"))) {
              String line;
              while ((line = is.readLine()) != null) {
                  content.add(line);
              }
              return content;
          }
      }
docs: -----------------------------------------------------------------------