I have a TreeeMap that i need to wite to file.
I tried this:
try
{
File file = new File("reboot_customer_details");
FileOutputStream f = new FileOutputStream(file);
ObjectOutputStream s = new ObjectOutputStream(f);
s.writeObject(customerDetails);//customerDetails is the map i need to save
s.close();
}
catch(Exception ex)
{
gui.results.setText("Error: " + ex);
}
When i add a key/value pair to the map this is what it saves
¬í sr java.util.TreeMapÁö>-%jæ L
comparatort Ljava/util/Comparator;xppw t GLENsr rbdeskapp.Customer„ÀýËwz L namet Ljava/lang/String;L phoneq ~ L postq ~ L repairst Ljava/util/List;L streetq ~ L townq ~ xpt glent t sr java.util.ArrayListxÒ™Ça I sizexp w
sr rbdeskapp.Repair9¸B¹AªÎ L newlineq ~ L notesq ~ xpt
t NOTESxt llt x
What do I need to do?
Glen