ObjectInputValidation interface in Java

java.io.ObjectInputValidation

Callback interface to allow validation of objects within a graph. Allows an object to be called when a complete graph of objects has been deserialized.

Declaration

public interface ObjectInputValidation {

        public void validateObject()
throws InvalidObjectException;
    }

Methods of ObjectInputValidation

1. validateObject()

void java.io.ObjectInputValidation.validateObject() throws InvalidObjectException

Validates the object.

Throws:

InvalidObjectException - If the object cannot validate itself.

No comments:

Post a Comment