fileIn = new InputStreamReader(new FileInputStream( oldOutFile.getAbsolutePath()), "UTF-8");
fileIn = new InputStreamReader(SecureAction.getFileInputStream( oldOutFile), "UTF-8");
	private void setOutput(File newOutFile, Writer newWriter, boolean append) {		if (newOutFile == null || !newOutFile.equals(this.outFile)) {			if (this.writer != null) {				try {					this.writer.close();				} catch (IOException e) {					e.printStackTrace();				}				this.writer = null;			}			// Append old outFile to newWriter. We only attempt to do this			// if the current Writer is backed by a File and this is not			// a new session.			File oldOutFile = this.outFile;			this.outFile = newOutFile;			this.writer = newWriter;			boolean copyFailed = false;			if (append && !newSession && oldOutFile != null) {				Reader fileIn = null;				try {					openFile();					fileIn = new InputStreamReader(new FileInputStream(							oldOutFile.getAbsolutePath()), "UTF-8");					copyReader(fileIn, this.writer);				} catch (IOException e) {					copyFailed = true;					e.printStackTrace();				} finally {					if (fileIn != null) {						try {							fileIn.close();						} catch (IOException e) {							e.printStackTrace();						}						// delete the old file if copying didn't fail						if (!copyFailed)							oldOutFile.delete();											}					closeFile();				}			}		}	}