EndOfList: Boolean;
The EndOfList method returns a flag of a page end of a binary file.
Executing this example requires a binary file 1.dat to be present in a root of the disc C.
Sub Main;
Var
File1: IFileInfo;
BinR: IBinaryReader;
IntList: IArrayList;
Begin
File1:=New FileInfo.Attach("c:\1.dat");
IntList:=New ArrayList.Create;
If File1.Exists Then
BinR:=File1.OpenBinaryReader;
BinR.ReadListBegin;
While Not BinR.EndOfList Do
IntList.Add(BinR.ReadInteger);
End While;
BinR.ReadListEnd;
End If;
Dispose File1;
End Sub Main;
After executing this example, integer values from the file 1.dat are read into the array IntList.
See also: