I want to save my Hashmap data to File by using this code:
File file = new File(getDir("data", MODE_PRIVATE), "map");
ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(file));
outputStream.writeObject(map);
outputStream.flush();
outputStream.close();
The problem is, I don't know how to read that File and convert it back to the hashmap. How can this be done?