/**** * 计算文件大小 * * @param length * @return */ public String ShowLongFileSzie(Long length) { if (length >= 1048576) { return (length / 1048576) + "MB"; } else if (length >= 1024) { return (length / 1024) + "KB"; } else if (length < 1024) { return length + "B"; } else { return "0KB"; } }
android 计算文件大小
最新推荐文章于 2023-04-20 10:02:59 发布