IBinaryReader.ReadListEnd

Syntax

ReadListEnd;

Description

The ReadListEnd method reads an indicator of a page end from a binary file.

Example

Executing the example requires the 1.dat binary file to be present in the 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 the example integer values from the 1.dat file are read into the IntList array. An indicator of the page end is read after reading an array.

See also:

IBinaryReader