Learned java BufferedWriter