输出流 写文件 文本 换行nextLine

 
FileOutputStream   fos   =   new   FileOutputStream( "c:\\test.txt "); 
String   nextLine   =   System.getProperty( "line.separator "); 
String   testStr   =   "abcd "+nextLine+ "efgh "+nextLine+ "igkl "
byte[]   c   =   testStr.getBytes(); 
fos.write(c); 
fos.close();
posted @ 2013-09-16 20:39  墨禾米说  阅读(227)  评论(0编辑  收藏  举报