updateChecksum

updateChecksum();

The updateChecksum method of the JadeBytes class calculates the MD5 checksum for the current binary contents of a singleFile instance and updates the stored checksum to match. It does nothing for shared file instances.

The following example shows the use of the updateChecksum method.

vars
    bytes : MyJadeBytes;
begin
    beginTransaction;
    create bytes persistent;
    bytes.singleFile := true;
    bytes.appendData("This is content".Binary);
    write bytes.matchChecksum();   // Writes "false"
    bytes.updateChecksum();
    write bytes.matchChecksum()    // Writes "true";
epilog
    abortTransaction;
end;