java.io
Interface ObjectInputValidation


public interface ObjectInputValidation

This class allows an object to validate that it is valid after deserialization has run completely for it and all dependent objects. This allows an object to determine if it is invalid even if all state data was correctly deserialized from the stream. It can also be used to perform re-initialization type activities on an object after it has been completely deserialized. Since this method functions as a type of callback, it must be registered through ObjectInputStream.registerValidation in order to be invoked. This is typically done in the readObject method.

See Also:
ObjectInputStream.registerValidation(java.io.ObjectInputValidation, int)

Method Summary
 void validateObject()
          This method is called to validate an object after serialization is complete.
 

Method Detail

validateObject

void validateObject()
                    throws InvalidObjectException
This method is called to validate an object after serialization is complete. If the object is invalid an exception is thrown.

Throws:
InvalidObjectException - If the object is invalid