How to put NEW LINE char in a file..?

Hi all,

Am writing some data to a file using File connection. Am appending all datas to a StringBuffer and finally writes into the FileOutPutStream and flushing it. Am appending new line character ('\n') to StringBuffer and it is printing perfectly on console but not in file. In file everything is coming as a single line. I checked the character length of StringBuffer and it is showing the '\n' numbers also. I tried many ways using byteArrayOutputStream, DataOutputStream etc. But didn't get the result. So please help me to put this new line character into the file.

Thanks and regards,

Hadhi.

[628 byte] By [pissing_crowa] at [2007-11-27 9:43:46]
# 1
> In file everything is coming as a single line.When viewed with what ?Notepad doesn't understand \n as a line terminator, if that's what you're using. Try \r\n, or try Wordpad, or BufferedReader.readLine().
ejpa at 2007-7-12 23:49:34 > top of Java-index,Core,Core APIs...