Example usage for org.apache.hadoop.util PureJavaCrc32 getValue

List of usage examples for org.apache.hadoop.util PureJavaCrc32 getValue

Introduction

In this page you can find the example usage for org.apache.hadoop.util PureJavaCrc32 getValue.

Prototype

@Override
    public long getValue() 

Source Link

Usage

From source file:com.subspace.network.Util.java

License:Open Source License

public static int CRC32(byte[] data) {
    PureJavaCrc32 crc32Fast = new PureJavaCrc32();
    crc32Fast.update(data, 0, data.length);

    return (int) crc32Fast.getValue();
}