Export (0) Print
Expand All

TextIo Class

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


class TextIo extends CommaIo

Called

Method

Description

cancelTimeOut

Cancels a previous method call to the Object.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

Overridden. Closes the file and, if data was written, flushes the file buffers to disk.

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

Overridden. Gets or sets the character that is used for the field delimiter of an input file represented by a TextIO object.

inRecordDelimiter

Overridden. Gets or sets the character that is used for the record delimiter of an input file represented by a TextIO object.

inRecordLength

Overridden. Gets or sets the record length for an input file.

new

Overridden. Creates a new instance of the TextIO class.

notify

Releases the hold on an object that has called a wait method on this object. (Inherited from Object.)

notifyAll

Releases a lock on the object that was issued by a wait method on this object. (Inherited from Object.)

objectOnServer

Determines whether the object is on a server. (Inherited from Object.)

outFieldDelimiter

Overridden. Gets or sets the character that is used for the field delimiter of an output file represented by a TextIO object.

outRecordDelimiter

Overridden. Gets or sets the character that is used for the record delimiter of an output file represented by a TextIO object.

owner

Returns the instance that owns the object. (Inherited from Object.)

read

Overridden. Reads the next full record from a TextIO object.

setTimeOut

Sets up the scheduled execution of a specified method. (Inherited from Object.)

status

Overridden. Retrieves the status of the last operation performed on a TextIo object.

toString

Returns a string that represents the current object. (Inherited from Object.)

usageCount

Returns the current number of references (the value of the reference counter) that the object has. (Inherited from Object.)

wait

Pauses a process. (Inherited from Object.)

write

Overridden. Writes data to a file represented by a TextIO object.

writeChar

Writes a Unicode character to a file.

writeExp

Overridden. Writes the contents of a container to a file represented by a TextIO object.

writeRaw

Reserved.

xml

Returns an XML string that represents the current object. (Inherited from Object.)

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.

Caution noteCaution

Unicode characters in Microsoft Dynamics AX that are not represented in the code page that is selected for writing will be converted to "?" characters upon output. Data lost in that way cannot be recovered.


Community Additions

ADD
Show:
© 2014 Microsoft