Dear Colleagues
Thank you for confirming my suspicion. ;-) At first sight, I thought that the private
read|writeExternal() methods are correct and that calling these methods occurs by means of the same mysterious mechanism that calls
read|writeObject(). Later I noticed, that
Externalizable is
not a marker interface, and therefore the
private modifier cannot come into consideration. I'm sorry for misleading you concerning the
ClassNotFoundException with
readExternal(); of course "the overriding method can throw narrower or fewer exceptions. Just because an overridden method "takes risks" doesn't mean that the overriding subclass' exception takes the same risks" (Sierra, K. and Bates B.,
SCJP Study Guide SE5, p. 102).
Good luck and best wishes,
Ralf