If we want to carry liquid in other city or any where then we must keep it CAN which can can carry it.
Here the liquid is our object of any class and we are we must keep it in file to carry in nay other location then that class must implements the serializable interface which is the markable inteface.
suppose we want to keep some fields not serialize then declare those fields as transient.
It means that field is not available while reading the serialized object from file.
Mangesh S. S. Waghaye,
Nagpur.
Tuesday, November 6, 2007
Externalization
If we want to write the readObject and writeObject as per our requirment we must implement our class by interface Externalizable .
for example if you want to sysout in readObject or in writeObject or any other changes then this is done by Externalizable interface which has two methods ,
1)readExternal(ObjectInput input).
2)writeExternal(ObjectOutput out).
Mangesh S.S.Wagahye,
Nagpur.
for example if you want to sysout in readObject or in writeObject or any other changes then this is done by Externalizable interface which has two methods ,
1)readExternal(ObjectInput input).
2)writeExternal(ObjectOutput out).
Mangesh S.S.Wagahye,
Nagpur.
Subscribe to:
Posts (Atom)