标签:
1 public void saveToSDCard(String filename, String content)throws Exception { 2 if(Environment.getExternalStorageDirectory().equals(Environment.MEDIA_MOUNTED)) { 3 Toast.makeText(this, "SDcard不存在", 1).show(); 4 }else { 5 File file = new File(Environment.getExternalStorageDirectory(), filename); 6 FileOutputStream outStream = new FileOutputStream(file); 7 outStream.write(content.getBytes()); 8 outStream.close(); 9 } 10 11 }
标签:
原文地址:http://www.cnblogs.com/zhangshan/p/4481522.html