I am new to serialization concept and i am trying to serialize PointF class as i need to send it over socket connection (I am using ObjectOutputStream and ObjectInputStream). My problem is while sending no matter what values i have in my PointF object while sending , after receiving i get default value.
example if i sent pointF(1.0,4.0) i get (0.0,0.0).
Following is my code for implimenting serializable.
public class MyPointF extends PointF implements Serializable {
/**
*
*/
private static final long serialVersionUID = -455530706921004893L;
public MyPointF() {
super();
}
public MyPointF(float x, float y) {
super(x, y);
}
}
Can anybody point out the problem? Also, after searching a little i found that this thing happens to android.canvas.Path class also. Please correct me where I am Wrong.