I have a java function which operate on huge amount of data may be 500MB. I have to pass this 500MB of data to a java function and return the data after processing from the java function.
My is in the tabular form as follows
col1 col2 col3 col4 col5 col6
3 5 2 5 1 6
7 5 6 8 3 8
5 3 7 9 8 1
I have few ideas in mind but don't know exactly which one is efficient and how to implement like which java api I need for those.
- Convert the data into java objects (each row one object of same class). Then pass the objects as an array to java function.
- Prepare XML doc from the tabular data and pass XML doc to java function. inside java function extract objects from XML document.
- Save the tabular data into file and input the file as argument to java function.
These ideas I have in my mind, if some one can provide pros and cons of above 3 methods or suggest some new method it will be grateful to me.