/**
* @Description long转文件大小M单位方法
* @author temdy
* @param bytes
* @return
*/
public String bytes2kb(long bytes) {
BigDecimal filesize = new BigDecimal(bytes);
BigDecimal megabyte = new BigDecimal(1024 * 1024);
float returnValue = filesize.divide(megabyte, 2, BigDecimal.ROUND_UP).floatValue();
return returnValue + "";
}
如果您觉得本文的内容对您的学习有所帮助:
关键字:
jquery