Here you can find the source of getLongWithChecksum(ByteBuffer buffer, Adler32 checksum)
static long getLongWithChecksum(ByteBuffer buffer, Adler32 checksum)
//package com.java2s; //License from project: Apache License import java.nio.ByteBuffer; import java.util.zip.Adler32; public class Main { static long getLongWithChecksum(ByteBuffer buffer, Adler32 checksum) { final long value = buffer.getLong(); checksum.update((int) (value & 0xFFFFL)); checksum.update((int) (value >> 32)); return value; }/* w w w. j ava 2 s . c om*/ }