• Post Reply Bookmark Topic Watch Topic
  • New Topic

Line endings from a different O/S  RSS feed

 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I use a FileReader to read a text file and a StringWriter to write it into a String. Then I do some stuff to the String and rewrite the file using a FileWriter. Each change to the String is always contained within a single line; I never intentionally add or remove line endings.

If the file contains line endings from a different operating system (e.g. Unix line endings on Windows), will these be retained in the final file?



Note that an HqnFile is just a File, as far as you are concerned!
[ January 31, 2007: Message edited by: Peter Chase ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!