If you are trying to read everything into memory, then I would suggest creating a wrapper class to help identify the data from the file along with the file information, so you can keep things organized. After that, there isn't much I can advise you on.
Related Q&A from Mark Belles
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.