Java ObjectInputStream registerValidation() MethodThe registerValidation() method of ObjectInputStream class method registers an object to be validated before the graph is returned. While this method is similar to resolveObject these validations are called after the entire graph has been reconstituted. SyntaxParameterObj: as the object to receive the validation callback. prio: as controls the order of callbacks ReturnsHave void as return type. ThrowsNotActiveException InvalidObjectException Example 1Output: Using readFields() : Welcome to javaTpoint Valiations : : : Welcome to javaTpoint Example 2Output: JavaTpoint
Next TopicJava ObjectInputStream
|