提示
Java IO BufferedWriter 使用示例。@ermo
public static void write() throws IOException {
String filepath = "src/main/resources/output.txt";
String data = "Some simple text.";
BufferedWriter out = new BufferedWriter(new FileWriter(filepath));
try {
out.write(data);
} finally {
out.close();
}
}
public static void main(String[] args) throws IOException {
write();
}