We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
再次打扰:
对于crc64功能上线以前的文件不能返回crc64值
public static String getCRC64FromFile(File file) throws IOException { final CRC64 total = new CRC64(); try (FileInputStream stream = new FileInputStream(file)) { final byte[] b = new byte[1024 * 1024]; while (true) { final int read = stream.read(b); if (read <= 0) { break; } total.update(b, read); } } return String.valueOf(total.getValue()); }
The text was updated successfully, but these errors were encountered:
今天又验证了一下,用5M的文件计算得到正确值,用10M的就是错误值,得到一个负数。 应该是哪个变量超出范围了吧
Sorry, something went wrong.
已经解决,不能String.valueOf。 java8 中用 Long.toUnsignedString
No branches or pull requests
再次打扰:
对于crc64功能上线以前的文件不能返回crc64值
”,我在官网没看到这个功能是什么时候上线的,方便在这告知一下这个时间点吗?我们公司用cos已经蛮多年了,需要确认一下这个上线时间。The text was updated successfully, but these errors were encountered: