public static String bytesToString(long value) {
    if (value < 0) {
      throw new IllegalArgumentException("Invalid memory size: " + value);
    }
    for (int i = 0; i < UNITS.length; i++) {
      long bytes = UNITS[i].getBytes();
      if (value >= bytes) {
        double numResult = bytes > 1 ? (double) value / (double) bytes : (double) value;
        return FORMATTER.format(numResult) + " " + UNITS[i].getName();
      }
    }
    return value + " " + UNITS[UNITS.length - 1].getName();
  }
Given a memory value in bytes, convert it to a string with the unit that round to a >0 integer part.

@param value The memory value in long bytes
@return The formatted string, null if
app/com/linkedin/drelephant/util/MemoryFormatUtils.java