@NotNull LineDiff[] compareContents(@NotNull File actual, @NotNull File expected) throws IOException {
    InputStream ais = null;
    InputStream eis = null;
    try {
      ais = new FileInputStream(actual);
      eis = new FileInputStream(expected);
      List<LineDiff> diffs = verifyEqualContent(readerFor(ais), readerFor(eis));
      return diffs.toArray(new LineDiff[diffs.size()]);
    } finally {
      closeQuietly(eis);
      closeQuietly(ais);
    }
  }
@NotNull LineDiff[] compareContents(@NotNull File actual, @NotNull File expected) throws IOException {
    InputStream ais = null;
    InputStream eis = null;
    try {
      ais = new FileInputStream(actual);
      eis = new FileInputStream(expected);
      List<LineDiff> diffs = verifyEqualContent(readerFor(ais), readerFor(eis));
      return diffs.toArray(new LineDiff[diffs.size()]);
    } finally {
      closeQuietly(eis);
      closeQuietly(ais);
    }
  }
@ NotNull LineDiff [ ] compareContents ( @ NotNull File actual , @ NotNull File expected ) throws IOException { InputStream ais = null ; InputStream eis = null ; try { ais = new FileInputStream ( actual ) ; eis = new FileInputStream ( expected ) ; List < LineDiff > diffs = verifyEqualContent ( readerFor ( ais ) , readerFor ( eis ) ) ; return diffs . toArray ( new LineDiff [ diffs . size ( ) ] ) ; } finally { closeQuietly ( eis ) ; closeQuietly ( ais ) ; } }
/*
Verifies that the given files have the same content. Adapted from <a
href="http://junit-addons.sourceforge.net/junitx/framework/FileAssert.html" target="_blank">FileAssert</a> (from <a
href="http://sourceforge.net/projects/junit-addons">JUnit-addons</a>.)
/ * Verifies that the given files have the same content . Adapted from <a href = http : // junit - addons . sourceforge . net / junitx / framework / FileAssert . html target = _blank > FileAssert< / a > ( from <a href = http : // sourceforge . net / projects / junit - addons > JUnit - addons< / a > . )