//---SD Card Storage---File sdCard = Environment.getExternalStorageDirectory();File directory = new File (sdCard.getAbsolutePath() +“/MyFiles”);directory.mkdirs();File file = new File(directory, “textfile.txt”);FileOutputStream fOut = new FileOutputStream(file);OutputStreamWriter osw = newOutputStreamWriter(fOut);//---write the string to the file---osw.write(str);osw.flush();osw.close();
2 回答

人到中年有點(diǎn)甜
TA貢獻(xiàn)1895條經(jīng)驗(yàn) 獲得超7個(gè)贊
sdCard = Environment.getExternalStorageDirectory(); File directory = new File (sdCard.getAbsolutePath() + “/MyFiles”); directory.mkdirs(); File file = new File(dire
添加回答
舉報(bào)
0/150
提交
取消