Is this code
BufferedWriter bw = new BufferedWriter(new FileWriter(\"test.txt\")); try { bw.write(\"test\"); } finally { IOUtils
It is safe so long as your application doesn't care whether the write succeeded without error. If your application needs to handle write errors it is not safe as buffered data flushed on close may be lost and the error swallowed.