• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






Kevin Gao

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2012年2月29日

Android中写文本文件的方法
摘要: 下面是我在Android开发中,一个写文本文件的方法,代码如下: //将字符串写入到文本文件中 public static void WriteTxtFile(String strcontent,String strFilePath) ... 阅读全文
posted @ 2012-02-29 17:08 Kevin Gao 阅读(27) 评论(0) 推荐(0)
 
Android中写文本文件的方法
摘要: 下面是我在Android开发中,一个写文本文件的方法,代码如下://将字符串写入到文本文件中 public static void WriteTxtFile(String strcontent,String strFilePath) { //每次写入时,都换行写 String strContent=strcontent+"\n"; try { File file = new File(strFilePath); if (!file.exists()) { Log.d("TestFile", "Create the file:" + s 阅读全文
posted @ 2012-02-29 17:07 Kevin Gao 阅读(9901) 评论(0) 推荐(0)
 
Android中读取文本文件中内容的方法
摘要: 这几天在项目开发中,要读取文本文件中内容的,因此写了个读取文本文件中内容的方法,代码如下: //读取文本文件中的内容 public static String ReadTxtFile(String strFilePath) { ... 阅读全文
posted @ 2012-02-29 17:06 Kevin Gao 阅读(14) 评论(0) 推荐(0)
 
Android中读取文本文件中内容的方法
摘要: 这几天在项目开发中,要读取文本文件中内容的,因此写了个读取文本文件中内容的方法,代码如下://读取文本文件中的内容 public static String ReadTxtFile(String strFilePath) { String path = strFilePath; String content = ""; //文件内容字符串 //打开文件 File file = new File(path); //如果path是传递过来的参数,可以做一个非目录的判断 if (file.isDirectory()) { Log.d("TestFile", & 阅读全文
posted @ 2012-02-29 17:05 Kevin Gao 阅读(32785) 评论(0) 推荐(0)