Change that same line as follows. The way following should work fine, because it deal with system properties.

Java Code:
out.write(System.getProperty("line.separator"));