调用了runscript:Context类中openFileOutput ()函数的使用
来源:百度文库 编辑:偶看新闻 时间:2024/05/02 00:49:08
Context类中openFileOutput ()函数的使用
函数声明:
FileOutputStream openFileOutput (String name, int mode)
作用:可以方便地再手机中创建文件,并返回文件输出流,用于对文件做写入操作。
name:
用于指定文件名称,不能包含路径分隔符“/”,如果文件不存在,Android会自动创建它。创建的文件保存在/data/data/
mode取值:
MODE_APPEND 私有(只有创建此文件的程序能够使用,其他应用程序不能访问),在原有内容基础上增加数据
MODE_PRIVATE 私有,每次打开文件都会覆盖原来的内容
MODE_WORLD_READABLE 可以被其他应用程序读取
MODE_WORLD_WRITEABLE 可以被其他应用程序写入
另:1.FileInputStream openFileInput (String name)
返回文件输入流,用于对文件的读操作。
2. Activity还提供了getCacheDir()和getFilesDir()方法:
getCacheDir()方法用于获取/data/data/
getFilesDir()方法用于获取/data/data/
context-aware
什么是context
software openGL context 什么意思
Software Open GL Context是什么意思?
"context tree"怎么翻译?
social context或者social contexts怎么翻译
计算机英语中的context怎么理解?
请问设备上下文(Device Context)是什么?
什么是关联数据模型Context Data Model
总提示context.exe产生了错误
context.dll是什么啊,怎么删不了
一条PPP连接能够承载多个PDP Context吗?
can ecreate compression context erfoper:4.erftype:9是什么意思
context和config的详细区别谁能说说
Name gkorac is not bound in this Context什么意思
求翻译In the context of ship survivability,
PDP context在通讯是表示什么意思啊?
context.dll怎么删不掉啊,已经把Ewido 卸载了
context menu 怎么翻译 翻译为上下文菜单有些牵强
server.xml找不到context,该如何配置虚拟站点
帮我结合上下文解释一个词:Context Management怎么翻译好
谁会翻译outside the context of the team, and see what ways forward they suggest
请助译一下:We have approached it in the context of the IAEA process in Vienna.
Possible invalid data received Errors Occurred in This Context什么意思???