Code example for CRC32

Methods: getValue, reset, update

0
     * Write a PNG "IEND" chunk into the pngBytes array. 
     */ 
    protected void writeEnd() { 
        bytePos = writeInt4(0, bytePos);
        bytePos = writeString("IEND", bytePos);
        crc.reset();
        crc.update("IEND".getBytes());
        crcValue = crc.getValue();
        bytePos = writeInt4((int) crcValue, bytePos);
    } 
}