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

extractUsingFile

extractUsingFile(file: File);

The extractUsingFile method of the JadeBytes class extracts the binary content of the receiver using a File object specified by the file parameter. If the file specified by the file parameter is not open, an exception is raised.

Examples where you would use this method instead of the extractToFile method include:

The following example shows the use of the extractUsingFile method.

vars
    bytes : JadeBytes;
    file  : File;
begin
    create bytes;
    bytes.setContent("JADE".Binary);
    create file;
    file.fileName := "c:\example.txt";
    file.open;
    bytes.extractUsingFile(file);
epilog
    delete bytes;
    delete file;
end;