private Map<String, List<DrawPath>> savedPath= new LinkedHashMap<String, List<DrawPath>>();
I want to write this "savedPath" to file, but throw a IOException:
public static class DrawPath implements Serializable{
/**
*
*/
public static final long serialVersionUID = 1L;
public Path path;
public Paint paint;
}
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(sdFile));
out.writeObject(savedPath); // throws IOExcption
It works successfully if changed to Map<String, String>
, is it relevant with my custom DrawPath class? How can I write this object to file success? Thanks