I have the following HashMap:
HashMap fileObj = new HashMap();
ArrayList cols
Your first line:
HashMap fileObj = new HashMap();
gave me pause, as the values are not guaranteed to be Serializable
and thus may not be written out correctly. You should really define the object as a HashMap
(or if you prefer, simpy Map
).
I would also consider serializing the Map in a simple text format such as JSON since you are doing a simple String -> List
mapping.