grow

grow(length: Integer64) updating;

The grow method of the JadeBytes class increases the virtual storage allocated to the binary content of the receiver to the length specified by the value of the length parameter.

If the specified length is less than or equal to the length that has already been allocated, the method has no effect.

The following example shows the use of the grow method.

vars
    bytes : JadeBytes;
begin
    create bytes;
    bytes.allocate(10);
    write bytes.getLength;       // Writes 10;
    bytes.grow(50);
    write bytes.getLength;       // Writes 50;
epilog
    delete bytes;
epilog
    delete stats;
end;