对Android内部储存的理解

来源:互联网 发布:java 类 编辑:程序博客网 时间:2024/05/22 17:19
anroid内部操作只需要函数提供文件名,and progremming could encoutage the file_title only. dont need inputStream /outputStream any more. could get the input/outputStream.
File file=new File(context.getFileDir(),filename);
if(!file.exists()){
file.createNewFile();
}
//or
OutputStream outputStream=operFileOutput(filename,Context.MODE_PRIVATE);
outputStream.write(string.getBytes());
outputStream.close();
0 0
原创粉丝点击