文件相关
鲸鱼芽
普普通通
展开
-
Java解析excel文件
public static List<User> getFile() { List<User> list = null; String excelPath = "D:\\Users\\Desktop\\file_demo.xlsx"; try { //String encoding = "GBK"; File excel = new File(excelPath);原创 2021-08-31 17:38:00 · 597 阅读 · 0 评论 -
将字节转成具体的字符串大小,精度小数点后2位
//将字节转成具体的字符串大小,精度小数点后2位 public static String getPrintSize(long size) { int GB = 1024 * 1024 * 1024;//定义GB的计算常量 int MB = 1024 * 1024;//定义MB的计算常量 int KB = 1024;//定义KB的计算常量 DecimalFormat df = new Decima...原创 2019-07-15 15:01:49 · 304 阅读 · 0 评论