Export (0) Print
Expand All

TextIo Class

Provides functionality for reading and writing text files.

NoteNote

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.



class TextIO extends CommaIO

Called

Method

Description

cancelTimeOut

Inherited from the Object class.

equal

Inherited from the Object class.

filePosition

Inherited from the CommaIO class.

finalize

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

getTimeOutTimerHandle

Inherited from the Object class.

handle

Inherited from the Object class.

inFieldDelimiter

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

inRecordDelimiter

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

inRecordLength

Gets or sets the record length for an input file.

new

Creates a new instance of the TextIO class.

notify

Inherited from the Object class.

notifyAll

Inherited from the Object class.

objectOnServer

Inherited from the Object class.

outFieldDelimiter

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

outRecordDelimiter

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

owner

Inherited from the Object class.

read

Reads the next full record from a TextIO object.

setTimeOut

Inherited from the Object class.

status

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

toString

Inherited from the Object class.

usageCount

Inherited from the Object class.

wait

Inherited from the Object class.

write

Writes data to a file represented by a TextIO object.

writeChar

Writes a Unicode character to a file.

writeExp

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

writeRaw

Reserved.

xml

Inherited from the Object class.

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