This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
OutputStreams are usually used for binary files. They don't provide any methods to add line breaks so you have to get the line break sequence using System.getProperty("line.separator") and append it to your lines or write it after each line. Error prone and tedious. A better alternative for working with character based files are the Reader classes. Several of those classes have methods to add new lines. For example, java.io.BufferedWriter has a newLine() method and java.io.PrintWriter has several println() methods.