Here you can find the source of bytesToMegaBytes(long bytes)
Parameter | Description |
---|---|
bytes | a parameter |
public static long bytesToMegaBytes(long bytes)
//package com.java2s; public class Main { private static final long MEGABYTE = 1024L * 1024L; /**//from ww w. ja v a2s . c o m * Convert bytes to MegaBytes * * @param bytes * @return megabytes */ public static long bytesToMegaBytes(long bytes) { return bytes / MEGABYTE; } }