OutputStreamWriter does not append

后端 未结 1 738
后悔当初
后悔当初 2021-01-12 05:11

Original code and its working saving the data to the SD Card

// Writing data to internal storage
btnSaveData.setOnClickListener(new View.OnClickListener() {
         


        
相关标签:
1条回答
  • 2021-01-12 06:04

    Constructor FileOutputStream( File file ) always overwrites file. If you want to append to file you have to use more generic constructor FileOutputStream( File file, boolean append ). If you set parameter 'append' to true file is not overwritten.

    0 讨论(0)
提交回复
热议问题