The ObjectInputStreamWithLoader Class contains the following method:
resolveClass instructs the class loader that is associated with the ObjectInputStreamWithLoader object to load the class indicated by the specified ObjectStreamClass object.