Java.io.ObjectInputStream enableResolveObject() Method
The java.io.ObjectInputStream.enableResolveObject(boolean enable) method enable the stream to allow objects read from the stream to be replaced. When enabled, the resolveObject method is called for every object being deserialized.
If enable is true, and there is a security manager installed, this method first calls the security manager's checkPermission method with the SerializablePermission("enableSubstitution") permission to ensure it's ok to enable the stream to allow objects read from the stream to be replaced.
Following is the declaration for java.io.ObjectInputStream.enableResolveObject() method.
protected boolean enableResolveObject(boolean enable)
enable − true for enabling use of resolveObject for every object being deserialized
This method returns the previous setting before this method was invoked.
SecurityException − If a security manager exists and its checkPermission method denies enabling the stream to allow objects read from the stream to be replaced.