TextIo Class
The TextIo class provides functionality for reading and writing text files.
Syntax
class TextIo extends CommaIo
Run On
Called
Methods
Method | Description | |
---|---|---|
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
filePosition | (Inherited from CommaIo.) | |
finalize | Closes the file and, if data was written, flushes the file buffers to disk. (Overrides the finalize Method.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
inFieldDelimiter | Gets or sets the character that is used for the field delimiter of an input file represented by a TextIO object. (Overrides the inFieldDelimiter Method.) | |
inRecordDelimiter | Gets or sets the character that is used for the record delimiter of an input file represented by a TextIO object. (Overrides the inRecordDelimiter Method.) | |
inRecordLength | Gets or sets the record length for an input file. (Overrides the inRecordLength Method.) | |
new | Creates a new instance of the TextIO class. (Overrides the new Method.) | |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) | |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) | |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) | |
outFieldDelimiter | Gets or sets the character that is used for the field delimiter of an output file represented by a TextIO object. (Overrides the outFieldDelimiter Method.) | |
outRecordDelimiter | Gets or sets the character that is used for the record delimiter of an output file represented by a TextIO object. (Overrides the outRecordDelimiter Method.) | |
owner | Returns the instance that owns the object. (Inherited from Object.) | |
read | Reads the next full record from a TextIO object. (Overrides the read Method.) | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
status | Retrieves the status of the last operation performed on a TextIo object. (Overrides the status Method.) | |
toString | Returns a string that represents the current object. (Inherited from Object.) | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
wait | Pauses a process. (Inherited from Object.) | |
write | Writes data to a file represented by a TextIO object. (Overrides the write Method.) | |
writeChar | Writes a Unicode character to a file. | |
writeExp | Writes the contents of a container to a file represented by a TextIO object. (Overrides the writeExp Method.) | |
writeRaw | Reserved. | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) |
Top
Remarks
TextIO replaces AsciiIO to provide support for non-ANSI code page file I/O. The TextIO constructor has an additional optional parameter to set the code page of the file.
The TextIO.new method has an optional argument that specifies the code page of the file. The default value is UTF-16LE (the Microsoft Windows native Unicode representation). It is best to use this in most instances, especially if end-users might edit the file in a text editor outside Microsoft Dynamics AX. For more information, see TextIo.new.
When files are read, TextIO examines the first few bytes of the file for a byte-order mark (BOM) and automatically handles UTF-8, UTF-16LE, and UTF-16BE. If no BOM is found, the file is assumed to be in the ANSI Code Page (ACP) format.
Inheritance Hierarchy
Object Class
Io Class
CommaIo Class
TextIo Class