android stored understand

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();

Reproduced in: https: //my.oschina.net/yourpapa/blog/621607

Guess you like

Origin blog.csdn.net/weixin_34391854/article/details/92033263