You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serialization is the process of converting an object into a stream of bytes in order to store an object into memory so that it can be recreated at a later time while still keeping the objects original state and data. In Java there are two methods of doing this, one is by implementing Serializable or Parcelable.
Parcelable is Android exclusive. Java has Externalizable.
In Android, however, Serializable should never be used in Android.
That's like saying you should never use enums on Android. (You shouldn't use enums to represent an integer or string constant.)
Parcelable was created to be more efficient then Serializable, and performs about 10x faster then Serializable because Serializable uses reflection which is a slow process and tends to create a lot of temporary objects which may cause garbage collection to occur more often.
That's the default if you just stamp Serializable interface onto a class and don't override writeObject or don't implement Externalizable. There's no mention that Parcelable is not as automatic as Serializable.
The text was updated successfully, but these errors were encountered:
Parcelable is Android exclusive. Java has Externalizable.
That's like saying you should never use enums on Android. (You shouldn't use enums to represent an integer or string constant.)
That's the default if you just stamp Serializable interface onto a class and don't override
writeObject
or don't implement Externalizable. There's no mention that Parcelable is not as automatic as Serializable.The text was updated successfully, but these errors were encountered: