2021.2

Table Of Contents
while((line = fileIn.readLine())!=null){
fileOut.write(line.replace((subject),""));
fileOut.newLine();
}
fileIn.close();
fileOut.close();
deleteFile(data.filename);
tmp.move(data.filename);
TextReader
The TextReader object, returned by the openTextReader() function, allows to open, parse, read
and close a text file. (See: "openTextReader()" on the previous page.)
Methods
The following table describes the methods of the TextReader object.
Method Description
close() Closes the stream and releases resources.
open(inStream,
inEncoding)
Creates a reader from an input stream.
Parameters:
l inStream: the input stream to read
l inEncoding: the encoding to use when reading the file
open(inFileName,
inEncoding)
Creates a reader on the specified file.
Parameters:
l inFilename: the path of the file to read
l inEncoding: the encoding to use when reading the file
parseCharset
(inEncoding)
Returns a character set (Charset). Character sets are used to convert
a binary data file into readable text.
Parameters:
l inEncoding: the encoding to use (e.g. ISO-8859-1, UTF-8)
Page 443