Ok need some general advice in terms of which technique to use for the following. I need to create a massive text file the contents of which are a matrix. The matrix is in the format (note that each element is a string not a char)
ABD
WAX
EQF
My problem comes from generating one that is of massive size, say
3.2x10^9 by 3.2x10^9
I have the code written that can generate a smaller matrix, but am wondering what is the best way to transfer a huge one to a file? I am aware that I need to use buffers and streams, but can some one elaborate on their use a bit? Is there a way to open a file, keep it open, and write one char or a set amount of chars at a time, and still have good performance?
Also how can I write a StringBuffer to a file without using toString() on the buffer?
Any advice, links or explanations will be greatly appreciated.