Java - unix file to windows file
835140Jan 28 2011 — edited Feb 1 2011I have a java program which saves a file to disk in linux which is then attached and emailed. The file is saved and opened in windows, so I want the file to be saved as a windows file.
I have tried replacing the LineFeeds(LF) with CRLF with the command dataBuf.replaceAll("\n","\r\n"), but this does not work. dataBuf is simply a string and is saved to file.
what can I do to the string in order to save it properly as a windows file?
Thanks