80,361
社区成员
发帖
与我相关
我的任务
分享
File readfile = new File(url);
try {
byte[] content = FileUtil.getBytesFromFile(readfile);
DecimalFormat df = new DecimalFormat("######0.00");
holder.textView.setText(df
.format((double) content.length / 1024 / 1024) + "MB");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}