2021.2

Table Of Contents
Method Description
read() Reads and returns the next character, or -1 if the end of the stream
has been reached.
readLine() Reads and returns the next line, or null if the end of the stream has
been reached.
skip(offset) Skips the specified number of characters.
Parameters:
l offset: the number of characters to skip
openTextWriter()
This function opens a file as a text file for writing purposes. The function returns a "TextWriter"
on the next page object. This must be closed at the end.
openTextWriter(filename, encoding, append)
filename
String that represents the name of the file to open.
encoding
String specifying the encoding to use (UTF-8, ISO-8859-1, etc.)..
append
Boolean parameter that specifies whether the file pointer should initially be positioned at the
end of the existing file (append mode) or at the beginning of the file (overwrite mode).
Example
In the following example, the openTextWriter() function is used to open the newly created
temporary file for writing:
var fileIn = openTextReader(data.filename);
var tmp = createTmpFile();
var fileOut = openTextWriter(tmp.getPath());
var line;
Page 444