Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 144
نمايش فراداده

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.

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( )