创建全局可读可写的文件

//全局可读可写的文件

public void on(View view) {
    try {
       FileOutputStream fis = openFileOutput("A.text", MODE_WORLD_READABLE+MODE_WORLD_WRITEABLE);
       fis.write("哈哈哈哈".getBytes());
    } catch (Exception e) {
       e.printStackTrace();
    }
 }
 

//全局可读文件
 public void on1(View view) {
    try {
       FileOutputStream fis = openFileOutput("A.text", MODE_WORLD_READABLE);
       fis.write("哈哈哈哈".getBytes());
    } catch (Exception e) {
       e.printStackTrace();
    }
 }
 

//全局可写文件
 public void on2(View view) {
    try {
     FileOutputStream fis = openFileOutput("A.text", MODE_WORLD_WRITEABLE);
       fis.write("哈哈哈哈".getBytes());
    } catch (Exception e) {
       e.printStackTrace();
  }
 }

posted @ 2015-11-09 05:30  随笔、  阅读(237)  评论(0编辑  收藏  举报