code: private String getFormattedValues(boolean readable, long size, long totalSize) {
      // If size is 1, total size is 5, and readable is true, it will
      // return a string as "1B (20%)"
      int percent = totalSize == 0 ? 0 : (int) (size * 100 / totalSize);
      String subSizeMessage = readable ? FormatUtils.getSizeFromBytes(size)
          : String.valueOf(size);
      return String.format(VALUE_AND_PERCENT_FORMAT, subSizeMessage, percent);
    }
docs: Gets the size and its percentage information, if readable option is provided,
  get the size in human readable format.
  
  @param readable whether to print info of human readable format
  @param size the size to get information from
  @param totalSize the total size to calculate percentage information
  @return the formatted value and percentage information