Product Information > JADE Encyclopaedia of Classes – Volume 1 > Chapter 1 - System Classes > isEmpty

isEmpty

isEmpty(): Boolean;

The isEmpty method of the JadeBytes class returns true if the receiver is empty; that is, no content has been assigned and no storage space has been allocated.

This method always returns false for singleFile instances, because the associated disk file is always present.

The following example shows the use of the isEmpty method.

vars
    bytes : JadeBytes;
begin
    create bytes;
    write bytes.isEmpty;         // Writes true
    bytes.allocate(1000);
    write bytes.isEmpty;         // Writes false
epilog
    delete bytes;
end;