Thrown
by the readObject( ) method
of an ObjectInputStream when it encounters
primitive type data where it expects
object data. Despite the exception name, this data is not optional,
and object deserialization is stopped.
![](http://87.249.105.167/mirror/javainanutshell/0596007736/images/0596007736/figs/java.io.OptionalDataException.gif;389354)
public class OptionalDataException extends ObjectStreamException {
// No Constructor
// Public Instance Fields
public boolean eof;
public int length;
}