protected boolean binaryCompareFileContents(File expected, File actual) throws IOException {
    FileInputStream expectedIs = new FileInputStream(expected);
    FileInputStream actualIs   = new FileInputStream(actual);

    // Compare byte-by-byte :)
    while (true) {
      //System.out.print(".");
      int expectedByte = expectedIs.read();
      int actualByte   = actualIs.read();

      // Not equal
      if (expectedByte != actualByte) return false;

      // EOF: files are equal
      if (-1 == expectedByte) return true;
    }
  }