2月7日学习日志

今天学习了本地存储方法的写数据代码。

String string = "要写入的内容";
FileOutputStream fos = null;
 try {
     fos = openFileOutput("文件名", Context.MODE_PRIVATE);
     fos.write(string.getBytes());
     fos.close();
     } catch (FileNotFoundException e) {
                    e.printStackTrace();
    } catch (IOException e) {
                    e.printStackTrace();
    }
原文地址:https://www.cnblogs.com/20193925zxt/p/14880883.html