| 知乎专栏 |
package cn.netkiller.security;
import java.nio.ByteBuffer;
import java.util.zip.CRC32;
public class CRC {
public static void main(String[] args) {
final CRC32 crc32 = new CRC32();
ByteBuffer data = ByteBuffer.wrap("http://www.netkiller.cn".getBytes());
crc32.update(data);
System.out.println(crc32.getValue());
}
}