code: public String format(int count)     {
          if (count < 0) {
              throw new NumberFormatException("ByteFormat: Byte count cannot be less than 0");
          }
  
          for (int i = 0; i < names.length; ++i) {
              if (count < LIMITS[i]) {
                  continue;
              }
  
              final float fVal = ((float) count) / LIMITS[i];
  
              // for KB, MB and GB we don't ever add an "s", but we do for "byte" if the count is other than 1
              final String name = i == names.length - 1 && fVal != 1.0 ? names[i] + "s" : names[i];
  
              synchronized (numberFormat) {
                  return numberFormat.format(fVal) + name;
              }
          }
  
          // if we're here, num must have been 0
          return "0" + names[names.length - 1] + "s";
      }
docs: Given a raw byte count such as 1024 or 1048576, format it in human-readable form such as
  "1 KB" or "1 GB".
  <p><br></p>
  Here are some example results using the default min/max values for fraction digits:
  <p><br></p>
  0                   - 0 bytes
  1                   - 1 byte
  1023                - 1,023 bytes
  1024 (1 KB)         - 1 KB
  1025                - 1 KB
  2000                - 2 KB
  1048575             - 1,024 KB
  1048576 (1 MB)      - 1 MB
  1048577             - 1 MB
  5000000             - 4.8 MB
  1073741824 (1 GB)   - 1 GB
  
  @param count int
  @return String
  @throws NumberFormatException Thrown if specified count is less than 0.
  @since 1.0.0