This module takes an int from a file, adds 10 to the amount in the txt file, then puts the results into another file.
I can get the results to the console but not to another file?
>>>bw.write(outLine);<<<
How can I get this to another file. Not sure why it is not processing?

farrago.txt == (1 3 4 5 7)

import java.io.*;
public class Copy {
public static void main(String[] args) throws IOException {

BufferedReader br=new BufferedReader(new FileReader("farrago.txt"));
BufferedWriter bw=new BufferedWriter(new FileWriter("outagain.txt"));
String line=null;
int n=0;
while ( (line = br.readLine()) != null) {
String[] intStr = line.split(" "); // if ints are separated by space
String outLine = "";

for (int i = 0; i < intStr.length; i++) {
intStr[i] = intStr[i].trim();
String s=intStr[i];
try {
n = Integer.parseInt(s);
} catch (NumberFormatException nfe) {
System.out.println("the line: ["+line+"] failed integer conversion");
System.out.println("Failure for :["+intStr[i]+"]");
System.out.println(nfe.getMessage());
System.out.println("Element was skipped");
continue;
}
n=n+10;
outLine += (n) + " ";
}
System.out.println(outLine);
bw.write(outLine);
bw.newLine();
}
}
}

Thanks....