Java CRC32 Byte Array crc32(byte[] array)

Here you can find the source of crc32(byte[] array)

Description

crc

License

Apache License

Declaration

public static final int crc32(byte[] array) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.zip.CRC32;

public class Main {
    public static final int crc32(byte[] array) {
        if (array != null) {
            return crc32(array, 0, array.length);
        }/*from   www.  j  ava2s . co m*/

        return 0;
    }

    public static final int crc32(byte[] array, int offset, int length) {
        CRC32 crc32 = new CRC32();
        crc32.update(array, offset, length);
        return (int) (crc32.getValue() & 0x7FFFFFFF);
    }
}

Related

  1. computeCRC(byte[] value)
  2. computeCRC32(byte[] bytes)
  3. crc32(byte[] bts)
  4. CRC32(byte[] buffer)
  5. crc32(byte[] bytes)
  6. crc32(byte[] bytes)