Hi, I want to serialize my class. I have this code :
public class Video implements Serializable{
public long videoId;
public String title;
public String publisher;
public String language;
public Date lastModified;
public Date published;
public String imageUrl;
public String url;
public Bitmap myVideoScreenshotBm;
//public Drawable myVideoScreenshotDrawable;
public CedemoVideo (long newVideoId) {
this.videoId=newVideoId;
}
}
As far I have check i'm getting a NotSerializableException because of the Bitmap variable.
I apparently need to implement :
private void writeObject(java.io.ObjectOutputStream out) throws IOException
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException
Anyone know what I should do in these function ?? How should I write my Bitmap variable ?Any code examples ? anyone did it ?