Build 1.0_r1(from source)

android.content
Class Formatter

java.lang.Object
  extended by android.content.Formatter

public final class Formatter
extends Object

Utility class to aid in formatting common values that are not covered by the standard java.util.Formatter


Constructor Summary
Formatter()
           
 
Method Summary
static String formatFileSize(Context context, long number)
          Formats a content size to be in the form of bytes, kilobytes, megabytes, etc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Method Detail

formatFileSize

public static String formatFileSize(Context context,
                                    long number)
Formats a content size to be in the form of bytes, kilobytes, megabytes, etc

Parameters:
context - Context to use to load the localized units
number - size value to be formated
Returns:
formated string with the number

Build 1.0_r1(from source)

Please submit a feedback, bug or feature