Java写文件
String strDistrictName = "fengyuzaitu"; try { FileOutputStream fos = new FileOutputStream("/storage/sdcard0/Android/data/test.txt"); OutputStreamWriter osw = new OutputStreamWriter(fos, "gb2312"); osw.write(strDistrictName); osw.flush(); } catch (Exception e) { e.printStackTrace(); } 本文转自fengyuzaitu 51CTO博客,原文链接:http://blog.51cto.com/fengyuzaitu/1609514,如需转载请自行联系原作者