The FileStream example demonstrates how to read/write a TInt32 variable and a simple class to/from a file stream.
This GUI based example uses CEmployee class to store necessary employee information.
The WriteInt32ToStreamL() method writes a TInt32 variable to a file stream.
The ReadInt32FromStreamL() method reads a TInt32 variable from a file stream.
The AppendInt32ToStreamL() method appends another TInt32 variable to an existing file stream.
The ReadAllTInt32FromStreamL() method reads all the existing TInt32 variables present in a file stream.
The WriteEmployeeToStreamL() method writes employee information to a file stream.
The ReadEmployeeFromStreamL() method reads employee information from file stream.
Click on the following link to download the example: FileStream.zip
Click: browse to view the example code.
RBuf, RFileWriteStream, RFileReadStream, TStreamPos
.