code: private void printProgress(long read, long size) {
      int progress = Math.min(100, (int) ((100 * read) / size));
      if (progress > lastProgress) {
        lastProgress = progress;
        System.out.println("Completed " + lastProgress + " % ");
      }
    }
docs: Print the progress.