Read:
FileReader fr = new FileReader("/data/data/com.example.steven.note/files/" + fileName);
int ch = 0;
while ((ch = fr.read()) != -1) {
content += String.valueOf((char) ch);
}
Write
FileOutputStream outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
outputStream.write(string.getBytes());
outputStream.close();
评论
发表评论