Java.IO.ObjectInputStream.RegisterValidation Method
Registers a callback for post-deserialization validation of objects.

Syntax

[Android.Runtime.Register("registerValidation", "(Ljava/io/ObjectInputValidation;I)V", "GetRegisterValidation_Ljava_io_ObjectInputValidation_IHandler")]
public virtual void RegisterValidation (IObjectInputValidation object, int priority)

See Also

IObjectInputValidation.ValidateObject

Parameters

object
an object that can validate itself by receiving a callback.
priority
the validator's priority.

Exceptions

TypeReason
Java.IO.InvalidObjectExceptionif object is null.
Java.IO.NotActiveExceptionif this stream is currently not reading objects. In that case, calling this method is not allowed.

Remarks

Registers a callback for post-deserialization validation of objects. It allows to perform additional consistency checks before the readObject() method of this class returns its result to the caller. This method can only be called from within the readObject() method of a class that implements "special" deserialization rules. It can be called multiple times. Validation callbacks are then done in order of decreasing priority, defined by priority.

[Android Documentation]

Requirements

Namespace: Java.IO
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1