Is the file supposed to be readable, or just store the data for efficient processing? In the latter case, what difference does it make if you have new lines or how the file looks at all?
It sound to me like you want to make a file that efficiently stores a lot of data for fast processing. Have you looked into random access files?
http://docs.oracle.com/javase/tutorial/essential/io/rafs.html