android存储的理解

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

你可能感兴趣的:(android存储的理解)