2021.2

Table Of Contents
openBinaryReader(filename)
filename
String that represents the name of the file to open.
openBinaryWriter()
Function that opens a file as a binary file for writing purposes. The function returns a
DataOutputStream(see DataOutputStream).
openBinaryWriter(filename, append)
filename
String that represents the name of the file to open.
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).
openTextReader()
Function that opens a file as a text file for reading purposes. The function returns a
"TextReader" on the next page object. Please note that the temporary file must be closed at the
end.
openTextReader(filename,encoding)
filename
String that represents the name of the file to open.
encoding
String that specifies the encoding of the file to read (UTF-8, ISO-8859-1, etc.).
Example
In the following example, the openTextReader() function is used to open the actual data sample
file in the DataMapper for reading.
var fileIn = openTextReader(data.filename);
var tmp = createTmpFile();
var fileOut = openTextWriter(tmp.getPath());
var line;
Page 442