We can take use of readResolve and writeReplace methods to designate replacement objects for both Externalizable and Serializable instances...
Just wanted to know couple of things:
1)Can readObject(ObjectInputStream is ) and writeObject(ObjectOutputStream os) methods be used in conjunction with readResolve() and writeReplace() for a Serilaizable class? Is it possible to replace the object and then perform modifications operations to the byte stream using readObject and writeObject 2)Exteralizable's writeExternal should explicitly coordinate with the supertype to save its state.Just wanted to know that is it true for Serializable super classes also(but not Externalizable) or the Serilizable classes state gets saved automatically when we write the instance to a stream?