getCacheDir()方法用于获取/data/data//cache目录
getFilesDir()方法用于获取/data/data//files目录
保存:
File file = new File(this.getFilesDir(),"info.txt");
OutputStream out = new FileOutputStream(file);
String value = number+"#"+password;
out.write(value.getBytes());
out.close();
读取
读取filedir
if(file.exists()&&file.length()>0){
try {
BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
String line = bufferedReader.readLine();
String numValue = line.split("#")[0];
String passValue = line.split("#")[1];
}