?? e456. calculating the checksum of a byte array.txt
字號:
byte[] bytes = "some data".getBytes();
// Compute Adler-32 checksum
Checksum checksumEngine = new Adler32();
checksumEngine.update(bytes, 0, bytes.length);
long checksum = checksumEngine.getValue();
// Compute CRC-32 checksum
checksumEngine = new CRC32();
checksumEngine.update(bytes, 0, bytes.length);
checksum = checksumEngine.getValue();
// The checksum engine can be reused again for a different byte array by calling reset()
checksumEngine.reset();
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -