Name

InvalidObjectException

Synopsis

This exception should be thrown by the validateObject( ) method of an object that implements the ObjectInputValidation interface when a deserialized object fails an input validation test for any reason.

java.io.InvalidObjectException

Figure 9-29. java.io.InvalidObjectException

public class InvalidObjectException extends ObjectStreamException {
// Public Constructors
     public InvalidObjectException(String reason);  
}

Thrown By

ObjectInputStream.registerValidation( ), ObjectInputValidation.validateObject( ), java.text.AttributedCharacterIterator.Attribute.readResolve( ), java.text.DateFormat.Field.readResolve( ), java.text.MessageFormat.Field.readResolve( ), java.text.NumberFormat.Field.readResolve( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.