TextIo Class

The TextIo class provides functionality for reading and writing text files.

Syntax

class TextIo extends CommaIo

Run On

Called

Methods

  Method Description
Gg957982.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif filePosition (Inherited from CommaIo.)
Gg957982.pubmethod(en-us,AX.60).gif finalize Closes the file and, if data was written, flushes the file buffers to disk. (Overrides the finalize Method.)
Gg957982.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif 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.)
Gg957982.pubmethod(en-us,AX.60).gif 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.)
Gg957982.pubmethod(en-us,AX.60).gif inRecordLength Gets or sets the record length for an input file. (Overrides the inRecordLength Method.)
Gg957982.pubmethod(en-us,AX.60).gif new Creates a new instance of the TextIO class. (Overrides the new Method.)
Gg957982.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif 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.)
Gg957982.pubmethod(en-us,AX.60).gif 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.)
Gg957982.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif read Reads the next full record from a TextIO object. (Overrides the read Method.)
Gg957982.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif status Retrieves the status of the last operation performed on a TextIo object. (Overrides the status Method.)
Gg957982.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg957982.pubmethod(en-us,AX.60).gif write Writes data to a file represented by a TextIO object. (Overrides the write Method.)
Gg957982.pubmethod(en-us,AX.60).gif writeChar Writes a Unicode character to a file.
Gg957982.pubmethod(en-us,AX.60).gif writeExp Writes the contents of a container to a file represented by a TextIO object. (Overrides the writeExp Method.)
Gg957982.pubmethod(en-us,AX.60).gif writeRaw Reserved.
Gg957982.pubmethod(en-us,AX.60).gif 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

See Also

AsciiIo Class