private void writeFile(String fileName, String info) {
try {
FileOutputStream fout = openFileOutput(fileName, MODE_PRIVATE);
byte[] bytes = info.getBytes();
fout.write(bytes);
fout.close();
} catch (Exception err) {
}
}
private String readFile(String fileName) {
try {
FileInputStream fin = openFileInput(fileName);
int length = fin.available();// 获取文件长度
byte[] bytes = new byte[length];
fin.read(bytes);
return EncodingUtils.getString(bytes, ENCODING);
} catch (Exception err) {
return "";
}
}