java 写文本换行
import org.apache.commons.io.FileUtils; public static void main(String[] args) throws IOException { File file = new File("c:\\1\\2\\3\\4.txt"); FileUtils.writeStringToFile(file, "1:\r\n", false); FileUtils.writeStringToFile(file, "2:\r\n", true); FileUtils.writeStringToFile(file, "3:\r\n", true); }