Code example for ObjectOutputStream

Methods: defaultWriteObject, writeObject

0
		return packageName + "_v" + String.valueOf(versionCode);
	} 
 
	private void writeObject(ObjectOutputStream out) throws IOException {
		// transient 以外 
		out.defaultWriteObject();
 
		// transient 
		SerializableBitmapWrapper sBitmap = null;
		if (icon instanceof BitmapDrawable) {
			sBitmap = new SerializableBitmapWrapper(((BitmapDrawable) icon)
					.getBitmap());
		} 
		out.writeObject(sBitmap);
	} 
 
	private void readObject(ObjectInputStream in) throws IOException,
			ClassNotFoundException { 
		// transient 以外 
		in.defaultReadObject();