Android
android.content
public final class

android.content.Formatter

java.lang.Object
android.content.Formatter

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

Summary

Public Constructors

            Formatter()

Public Methods

      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

Details

Public Constructors

public Formatter()

Public Methods

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
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48