Java
Chilkat2 Java
Compute CRC32 of a File
Calculates the CRC32 of a file's contents and returns the 32-bit CRC as a hex string.Chilkat Java Downloads
import com.chilkatsoft.chilkat2.ZipCrc;
public class ChilkatExample {
public static void main(String[] args) {
ZipCrc zipCrc = new ZipCrc();
// Use a relative for absolute path to the file..
int crc = (int) zipCrc.fileCrc("qa_data/hamlet.xml");
String hexStr = zipCrc.toHex(crc);
System.out.println(hexStr);
}
}