다음을 통해 공유


ObjectOutputStream.EnableReplaceObject(Boolean) Method

Definition

Enable the stream to do replacement of objects in the stream.

[Android.Runtime.Register("enableReplaceObject", "(Z)Z", "GetEnableReplaceObject_ZHandler")]
protected virtual bool EnableReplaceObject (bool enable);
[<Android.Runtime.Register("enableReplaceObject", "(Z)Z", "GetEnableReplaceObject_ZHandler")>]
abstract member EnableReplaceObject : bool -> bool
override this.EnableReplaceObject : bool -> bool

Parameters

enable
Boolean

boolean parameter to enable replacement of objects

Returns

the previous setting before this method was invoked

Attributes

Remarks

Enable the stream to do replacement of objects in the stream. When enabled, the replaceObject method is called for every object being serialized.

If enable is true, and there is a security manager installed, this method first calls the security manager's checkPermission method with a SerializablePermission("enableSubstitution") permission to ensure it's ok to enable the stream to do replacement of objects in the stream.

Java documentation for java.io.ObjectOutputStream.enableReplaceObject(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also