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 + " % ");
    }
  }
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 + " % " ) ; } }
Print the progress.