|
I have a class hierachy that needs to be serialized into a single file... but I'm having some trouble with getting the serialization right.
Lets say this is the tree: class Manager -----has an ArrayList of class SubClass1 -------------which has an ArrayList of class SubClass2 ---------------------which contains ArrayLists of differing data.
I would like the class Manager to be serialized into one file. I think I read somewhere ArrayLists do not serialize... so before serialization is attempted, the arraylist.toArray() is called in each class, and each class' ArrayList is stored in an internal Object[].
All that the file this is serialized to contains is the variable names of class Manager. So, I am guessing that serialization will not take this hierarchy down into one file. Am I doing something wrong? Or should I be using a method other than serialization to store this hierarchy?
Due to licensing I cannot release code files on the project, but I could include snippets. Any help would be greatly appreciated.
|