读写内部存储的文件数据
读
FileOutputStream fos = OpenFileOutput(filename,Context.Mode_private);
OutputStreamWriter osw = new OutputStreamWriter();
osw.write();
osw.flush();
fos.flush();
osw.close();
fos.close();
写
FileInputStream......
读写外部存储文件数据 SD卡
menifest文件里write....external.....
获取SD卡路径:File sdcard = Enviroment.getExernalStorageDirectory();
File mfile = new File(sdcard,"This is my file.txt");
if(sdcard.exists()){myfile.createNewFile();FileOutputStream fos = new FileOutputStream(myfile);}//写
File mfile = new file();
if(sdcard.exists()){}//读