TextOutputStream
Class: TextOutputStream

Method PrototypeDescription
property Delimiter As String(read/write)The endofLine character when using WriteLine. Default: A carriage return.
Property LastErrorCode As Uint64 (read only)Contains the last error code, otherwise 0.
Property PositionB As Uint64 (read only)The position of the file pointer (in bytes).
Property WriteError As Boolean (read only)True if an error has occurred while writing the file, otherwise False.

Sub Close()Closes the output stream and releases the file handle.
Sub Flush()Clears and saves the contents of the stream to disk.
Sub Write( data As String )Writes data to the output stream.
Method WriteLine( data As String )Writes 1 line of data to the output stream, including a trailing EndOfLine.


The TextOutputStream class is used to write text files. To create a TextOutputStream object, create a FolderItem object and call its CreateTextFile() or AppendToTextFile() method.

To read text files use the TextInputStream class. To read and write binary files use the BinaryStream class.

TexOutputStream implements the Writeable interface.

The TextEncoding class is not implemented in Yuma. For methods that take encodings as parameters in REALBasic, drop those parameters in Yuma. Similarly the TextOutputStream.Encoding property doesn't exist in Yuma.

The "Handle" features are not implemented in Yuma. For methods that take handles as parameters in REALBasic, drop those parameters in Yuma. Similarly the TextOutputStream.Handle property doesn't exist in Yuma.