Sorting Large Text Files in Java
807580Jul 28 2010 — edited Jul 29 2010Hi. I have very large text files that I need to sort. They're typically 4 - 10 million rows long and 5 columns wide of standard double numbers. I'd like to create an object for each row and sort the file based on the contents of the first column and then the second column, but obviously I can't read all the rows into memory at once. Is there any way of sorting the file without reading the entire thing into memory?