how to write a lengthy string to a text file in a single line

hi, this is ravi kiranI am trying to write a lengthy string to a text file, in the text file the string is appearing in multiple lines. What i want is the lengthy string to be in a single long line.help methanx in advance.
[250 byte] By [raviva] at [2007-11-26 15:35:45]
# 1
So remove any carriage return and newline codes in that string. And make sure the editor you use for viewing the file does not wrap lines for convenience.
quittea at 2007-7-8 21:53:20 > top of Java-index,Java Essentials,Java Programming...
# 2

my string doesnot contain any newline characters, I am using note pad to edit the created file(which is .txt file).

i am using the follwing code--

BufferedWriter out=new BufferedWriter(new FileWriter(somefile.txt)

String st="some lengthy string";

out.write(st);

Even though my string doesnt contain any new line characters, in the note pad the lengthy string is appearing in multiple lines.

raviva at 2007-7-8 21:53:20 > top of Java-index,Java Essentials,Java Programming...
# 3

That is because Notepad displays it that way, not because the file contains multiple lines.

Open Notepad, click the menu Format and make sure that Word Wrap is off.

If the line is really long, Notepad may display it in multiple lines regardless of the word wrap setting. There's nothing you can do about that, that's just how Notepad works. Use a better text editor than Notepad.

jesperdja at 2007-7-8 21:53:20 > top of Java-index,Java Essentials,Java Programming...