setContent

setContent(data: Binary) updating;

The setContent method of the JadeBytes class sets or replaces the content of the receiver with the specified data and removes any virtual storage previously allocated to the object. The method uses the smallest number of segments and the smallest size of tail segment from the range of valid segment sizes, to provide the best fit for the content.

The following example shows the use of the setContent method.

vars
    bytes : JadeBytes;
begin
    create bytes;
    bytes.setContent("Jade".Binary);
    bytes.setContent("Bytes".Binary);
    write bytes.getContent;      // Writes "Bytes"
epilog
    delete bytes;
end;