Java CRC32 Byte Array getCRC()

Here you can find the source of getCRC()

Description

thread-singleton crc engine

License

Open Source License

Declaration

public static CRC32 getCRC() 

Method Source Code

//package com.java2s;

import java.util.zip.CRC32;

public class Main {
    private static final ThreadLocal<CRC32> crcProvider = new ThreadLocal<CRC32>() {
        protected CRC32 initialValue() {
            return new CRC32();
        }//from w  ww  .j a  va 2s.c  o  m
    };

    /** thread-singleton crc engine */
    public static CRC32 getCRC() {
        return crcProvider.get();
    }
}

Related

  1. crc32(final byte[] bytes)
  2. crc32(String value)
  3. crc32Number(String s)
  4. crcBytes(byte[]... data)
  5. createRandomCrc32Hex()
  6. getCrc32(byte[] buf)
  7. getCRC32(String str)
  8. getCrc32asInt(byte[] in)
  9. getCRC32Checksum(byte[] bytes)