class Diff {

  @VisibleForTesting
  public List<Delta<String>> diff(InputStream actual, InputStream expected) throws IOException {
    return diff(readerFor(actual), readerFor(expected));
  }

  @VisibleForTesting
  public List<Delta<String>> diff(InputStream actual, String expected) throws IOException {
    return diff(readerFor(actual), readerFor(expected));
  }

  @VisibleForTesting
  public List<Delta<String>> diff(File actual, Charset actualCharset, File expected, Charset expectedCharset) throws IOException {
    return diff(actual.toPath(), actualCharset, expected.toPath(), expectedCharset);
  }

  @VisibleForTesting
  public List<Delta<String>> diff(Path actual, Charset actualCharset, Path expected, Charset expectedCharset) throws IOException {
    return diff(newBufferedReader(actual, actualCharset), newBufferedReader(expected, expectedCharset));
  }

  @VisibleForTesting
  public List<Delta<String>> diff(File actual, String expected, Charset charset) throws IOException {
    return diff(actual.toPath(), expected, charset);
  }

  @VisibleForTesting
  public List<Delta<String>> diff(Path actual, String expected, Charset charset) throws IOException {
    return diff(newBufferedReader(actual, charset), readerFor(expected));
  }

  private BufferedReader readerFor(InputStream stream) {
    return new BufferedReader(new InputStreamReader(stream, Charset.defaultCharset()));
  }

  private BufferedReader readerFor(String string) {
    return new BufferedReader(new StringReader(string));
  }

  private List<Delta<String>> diff(BufferedReader actual, BufferedReader expected) throws IOException {
    try {
      List<String> actualLines = linesFromBufferedReader(actual);
      List<String> expectedLines = linesFromBufferedReader(expected);

      Patch<String> patch = DiffUtils.diff(expectedLines, actualLines);
      return unmodifiableList(patch.getDeltas());
    } finally {
      closeQuietly(actual, expected);
    }
  }

  private List<String> linesFromBufferedReader(BufferedReader reader) throws IOException {<FILL_FUNCTION_BODY>}
}

    String line;
    List<String> lines = new ArrayList<>();
    while ((line = reader.readLine()) != null) {
      lines.add(line);
    }
    return lines;
  
<no_super_class>