com.android.sdklib.util
Class FormatUtils

java.lang.Object
  extended by com.android.sdklib.util.FormatUtils

public abstract class FormatUtils
extends java.lang.Object

Helper methods to do some format conversions.


Constructor Summary
FormatUtils()
           
 
Method Summary
static java.lang.String byteSizeToString(long size)
          Converts a byte size to a human readable string, for example "3 MiB", "1020 Bytes" or "1.2 GiB".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatUtils

public FormatUtils()
Method Detail

byteSizeToString

@NonNull
public static java.lang.String byteSizeToString(long size)
Converts a byte size to a human readable string, for example "3 MiB", "1020 Bytes" or "1.2 GiB".

Parameters:
size - The byte size to convert.
Returns:
A new non-null string, with the size expressed in either Bytes or KiB or MiB or GiB.