Some methods in ObjectInputStream and ObjectOutputStream can only be called
from a nested call to readObject() or writeObject(). Any attempt to call them
from another context will cause this exception to be thrown. The list of
methods that are protected this way is: