code: public static List<String> readLines(File file, Charset charset) throws IOException {
      // don't use asCharSource(file, charset).readLines() because that returns
      // an immutable list, which would change the behavior of this method
      return readLines(
          file,
          charset,
          new LineProcessor<List<String>>() {
            final List<String> result = Lists.newArrayList();
  
            @Override
            public boolean processLine(String line) {
              result.add(line);
              return true;
            }
  
            @Override
            public List<String> getResult() {
              return result;
            }
          });
    }
docs: Reads all of the lines from a file. The lines do not include line-termination characters, but
  do include other leading and trailing whitespace.
  
  <p>This method returns a mutable {@code List}. For an {@code ImmutableList}, use
  {@code Files.asCharSource(file, charset).readLines()}.
  
  @param file the file to read from
  @param charset the charset used to decode the input stream; see {@link StandardCharsets} for
  helpful predefined constants
  @return a mutable {@link List} containing all the lines
  @throws IOException if an I/O error occurs