If the lines where entered by Enter, do:
content = content.replaceAll("\r?\n", "\r\n");
This then uses the real line break under Windows: \r\n
(CR+LF). A single \n
is not shown in Notepad. Unlikely though.
If the multiple lines were caused by word wrapping, the case is more difficult.
If by adding spaces,
content = content.replaceAll(" +", "\r\n");