private static void copyFileRenameWithSize(final File sourceFile, final File targetDir)
      throws IOException {
    final File targetFile = renameWithSize(sourceFile, targetDir);
    Files.copy(
        sourceFile.toPath(),
        targetFile.toPath(),
        StandardCopyOption.REPLACE_EXISTING,
        StandardCopyOption.COPY_ATTRIBUTES);

    LOGGER.info(
        COPY_FILE_MESSAGE, sourceFile.getName(), targetFile.getName(), targetDir.getAbsolutePath());
  }
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