How to write new line in Java FileOutputStream

后端 未结 4 969
悲哀的现实
悲哀的现实 2020-12-07 00:24

I want to write a new line using a FileOutputStream; I have tried the following approaches, but none of them are working:

encfileout.write(\'\\n         


        
4条回答
  •  离开以前
    2020-12-07 01:14

    To add a line break use fileOutputStream.write(10); because decimal value 10 represents newline in ASCII

提交回复
热议问题