private static boolean haveSameMD5(final File file1, final File file2) {
    try (final InputStream is1 = Files.newInputStream(file1.toPath());
        final InputStream is2 = Files.newInputStream(file2.toPath())) {
      return DigestUtils.md5Hex(is1).equals(DigestUtils.md5Hex(is2));
    } catch (final Exception e) {
      return false;
    }
  }
Transfer bytes to human-readable string. Copy from <a
href="https://stackoverflow.com/a/3758880">stackoverflow</a>.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/FileUtils.java