code: public static String createHumanReadableSizeString(long size) {
  	DecimalFormat format = new DecimalFormat("#.##");
  	BinaryPrefix prefix = BinaryPrefix.getSuitablePrefix(size);
  	double doubleSize = size / prefix.getBinaryFactor().doubleValue();
  	return format.format(doubleSize) + prefix.getUnit() + "B";
      }
docs: This method converts a size in bytes into a string which can be used to be
  put into UI.
  
  For example: 1024 will be converted into '1kB', 1024*1024 bytes into '1MB'
  and so forth.
  
  @param size
  is the size of the file in Byte to be converted into a
  {@link String}.
  @return A {@link String} is returned.