如何从OutputStreamWriter读取布尔数组?

时间:2017-08-18 14:53:59

标签: android save local-storage storage saving-data

public void writeArraytofile() {
    try {
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(openFileOutput("array.txt", Context.MODE_PRIVATE));
        outputStreamWriter.write(Arrays.toString(array));
        outputStreamWriter.close();
    } catch (IOException e) {
        Log.v("MyActivity", e.toString());
    }
}

我想我已经找到了如何将数组写入文件,但我仍然不知道如何阅读。有人能告诉我它是如何工作的吗?

0 个答案:

没有答案