add methods

This commit is contained in:
Looly 2020-08-02 19:38:14 +08:00
parent d07feb9065
commit 758626a482

View File

@ -1241,4 +1241,17 @@ public class IoUtil {
}
return checksum;
}
/**
* 计算流的校验码计算后关闭流
*
* @param in
* @param checksum {@link Checksum}
* @return Checksum
* @throws IORuntimeException IO异常
* @since 5.4.0
*/
public static long checksumValue(InputStream in, Checksum checksum){
return checksum(in, checksum).getValue();
}
}