Java CRC32 Byte Array crc32(byte[] bts)

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

Description

Calculates the crc32 and casts it to an integer, this avoids clojure's number autoboxing

License

Apache License

Parameter

Parameter Description
bts a parameter

Declaration

public static final long crc32(byte[] bts) 

Method Source Code

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

import java.util.zip.CRC32;

public class Main {
    /**/*from w w w. j a va 2 s. c o m*/
     * Calculates the crc32 and casts it to an integer,
     * this avoids clojure's number autoboxing
     *
     * @param bts
     * @return
     */
    public static final long crc32(byte[] bts) {
        final CRC32 crc = new CRC32();
        crc.update(bts);
        return crc.getValue();
    }
}

Related

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