putData
putData(offset: Integer64; data: Binary) updating;
The putData method of the JadeBytes class copies the binary data specified by the data parameter into the binary content of the receiver at the offset specified by the value of the offset parameter, overwriting the existing content. The offset parameter must contain a value between one and the current length of the binary content of the receiver. In addition, the value of the offset parameter plus the length of the binary data in the data parameter must not exceed the current length of the binary content of the receiver.
You can use the allocate method to allocate virtual storage before randomly inserting data into the receiver in a piece-wise fashion.
This partial-update method clears the stored checksum of singleFile instances.
You can use the putData method to update parts of the binary content of a JadeBytes object, as shown in the following example.
vars bytes : JadeBytes; begin create bytes; bytes.setContent("JADE".Binary); bytes.putData(2, "UN".Binary); write bytes.getContent; // Writes "JUNE" epilog delete bytes; end;