org.linkedin.util-core/src/main/java/org/linkedin/util/lang/MemorySize.java
public String getFractionalSizeAsString()
  {
    if(_size == 0)
      return "0";

    long sizeInBytes = getSizeInBytes();

    // determine the biggest size unit with non 0 size
    for(SizeUnit sizeUnit : ORDERED_SIZE_UNIT)
    {
      if(sizeUnit == SizeUnit.BYTE)
        return String.valueOf(sizeInBytes);
      
      if(sizeInBytes >= sizeUnit.getBytesCount())
      {
        double fractionalSize = (double) sizeInBytes / sizeUnit.getBytesCount();
        return String.format("%.2f%s", fractionalSize, sizeUnit.getDisplayChar());
      }
    }

    throw new RuntimeException("should not reach this line...");
  }
public String getFractionalSizeAsString()
  {
    if(_size == 0)
      return "0";

    long sizeInBytes = getSizeInBytes();

    // determine the biggest size unit with non 0 size
    for(SizeUnit sizeUnit : ORDERED_SIZE_UNIT)
    {
      if(sizeUnit == SizeUnit.BYTE)
        return String.valueOf(sizeInBytes);
      
      if(sizeInBytes >= sizeUnit.getBytesCount())
      {
        double fractionalSize = (double) sizeInBytes / sizeUnit.getBytesCount();
        return String.format("%.2f%s", fractionalSize, sizeUnit.getDisplayChar());
      }
    }

    throw new RuntimeException("should not reach this line...");
  }
Returns this memory size as a fractional size representation using the biggest unit size
possible. ex: 1.23g

@return a string representing a this memory size as a fraction using the biggest size unit
possible