Here you can find the source of bytesToMB(long sizeInBytes)
public static long bytesToMB(long sizeInBytes)
//package com.java2s; //License from project: Apache License public class Main { public static long bytesToMB(long sizeInBytes) { return sizeInBytes / (1024 * 1024); }//from ww w . jav a 2 s . c o m }