java 向文档末尾添加内容,打印LOG

BufferedWriter out = null; 
try { 
    out = new BufferedWriter(new FileWriter(”filename”, true)); 
    out.write(”aString”); 
} catch (IOException e) { 
    // error processing code 
} finally { 
    if (out != null) { 
         out.close(); 
    } 
}

你可能感兴趣的:(java 向文档末尾添加内容,打印LOG)