java 计算文件 md5值

String path = "C:\Users\mike\Downloads\1\2.txt";
String md5Hex = DigestUtils.md5Hex(new FileInputStream(path));
System.out.println(md5Hex);
原文地址:https://www.cnblogs.com/mikemhm/p/13613433.html