loadUsingFile(file: File) updating;
The loadUsingFile method of the JadeBytes class loads 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.
This method is an alternative to the loadFromFile method, with the following additional functionality.
Greater control over file usage semantics; for example, converting a text file from ANSI to Unicode.
Enabling the input file to be opened on the presentation client
The following example shows the use of the loadFromFile method.
vars bytes : JadeBytes; file : File; begin create file; file.fileName := "c:\photo.jpg"; file.open; create bytes; bytes.loadUsingFile(file); epilog delete bytes; delete file; end;