Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.text.format.Formatter; public class Main { public static String formatSize(Context context, long sizeInBytes) { return Formatter.formatFileSize(context, sizeInBytes); } }