public static void moveFileWithMD5Check(final File sourceFile, final File targetDir)
      throws IOException {
    final String sourceFileName = sourceFile.getName();
    final File targetFile = new File(targetDir, sourceFileName);
    if (targetFile.exists()) {
      // Check if the file sizes are the same
      if (sourceFile.length() == targetFile.length()) {
        moveWithMD5Check(sourceFile, targetDir, targetFile);
        return;
      }
      moveFileRenameWithSize(sourceFile, targetDir);
    } else {
      org.apache.commons.io.FileUtils.moveFileToDirectory(sourceFile, targetDir, true);
    }
  }
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