permission = new FileIoPermission(filename, #io_write);
permission.assert();
file = new TextStreamIo();
if (!file)
throw Exception::Error;
//file.outRecordDelimiter(#delimiterCRLF);
file.outFieldDelimiter("\n");
conLength = conLen(con);
for(i = 1; i<=conLength; i++)
{
line = conPeek(con, i);
file.write(line);
}
System.IO.FileStream fileStream = file.getStream();
file::SendFileToUser(fileStream, _filename);
Here is my code, but when i change to TextStreamIO, the file = new TextStreamIo(); have an error because it's protected. Please help !