Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

adding a newline character to a file using fileoutputstream  RSS feed

 
jay sheth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i am not been able to write into file line by line.
its gets added into the same line.
how to add a new line character while writing into a file using fileoutputstream.write()
jay.
 
Carlos Failde
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the requiremnt to use fileoutputstream.write(), but how about wrapping your fileoutputstream with a printstream and using printstream.println() ?
 
jay sheth
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for suggestion.
bye,
jay.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!