Returns all of the text (as a string) from the TextInputStream.
The optional Encoding parameter enables you to specify the encoding of the text. If you pass Nil, the default encoding is used. This is usually UTF-8, unless it was set to another encoding via an assignment statement. If you want to set the encoding to Nil, use the Encoding property instead.
This example is opens a text file that the user selects into a TextInputStream and then displays it in a TextArea.
dim dlg as openDialog
dim t as textInputStream
//create a new openDialog
dlg = new OpenDialog
//set what type of file it looks for
//run the dialog
f = dlg.showModal
//check to make sure the user didn't click cancel
if f <> nil then
t = TextInputStream.Open(f)
//make sure we could open it
if t <> nil then
//Read all of t into myTextArea.text
//close the file so that other applicaitons can use it
//the file could not be a read as a text file
msgBox "The selected file is not a text file."
//the user clicked cancel... just ignore it