*
* @throws IOException if the file is already open for either appending or reading, if the file does not exist, if the file cannot be opened for any other file system specific reason.
*/
public void jsFunction_openForReading() throws CarbonException {
if (writer != null)
throw new CarbonException(
"Cannot read from the already writing file. Please close the file beforehand by calling close().");
if (reader == null) {
try {
reader = new BufferedReader(new FileReader(file));
} catch (FileNotFoundException e) {
throw new CarbonException(e);
}
}
}