首页 > 其他 > 详细

读写存储内外部文本数据

时间:2015-07-31 19:53:34      阅读:184      评论:0      收藏:0      [点我收藏+]

 

读写内部存储的文件数据

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()){}//读

 

读写存储内外部文本数据

原文:http://www.cnblogs.com/hzwcoming/p/4692833.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!