i am doing a simple app to write some text into a file and reading it back.
i was able to create the text file and write the text using the RFileWriteStream.the problem is with reading....
i want to read the text to a buffer and dispaly it in the listbox.i am giving my code for reading to a buffer
User::LeaveIfError( fileSession.Connect() );
CleanupClosePushL( fileSession );
User::LeaveIfError( file.Open( fileSession, KFilesPath, EFileRead ) );
CleanupClosePushL( file );
CleanupClosePushL( readStream );
HBufC* readData = HBufC::NewLC( readStream,KMaxPlainTextDataLength);
iAppContainer->PrintLineL( *readData );
when i am running the app,the text is displayed in the listbox with the first character missing and some special characters in between the characters
i have entered.
whats wrong with the code for reading a file's content to a buff?
is der anyother way to dispaly the text other than listbox?
please help me to sort out this problem........
all ur replies are apperciated