Here you can find the source of getCRC32Checksum(byte[] bytes)
Parameter | Description |
---|---|
bytes | byte array |
public static long getCRC32Checksum(byte[] bytes)
//package com.java2s; //License from project: Apache License import java.util.zip.CRC32; import java.util.zip.Checksum; public class Main { /**/*from w w w . ja v a 2 s .c om*/ * Generate CRC32 Checksum For Byte Array. * * @param bytes byte array * @return checksum CRC32 checksum value * @since 3.3 */ public static long getCRC32Checksum(byte[] bytes) { Checksum checksum = new CRC32(); checksum.update(bytes, 0, bytes.length); return checksum.getValue(); } }