In other words, a marshalled object is a container for the serialized representation of another object. Instead, the contained object must be deserialized in an explicit step. With marshalled objects, you can postpone deserialization until you actually need the object. If an object must pass through many virtual machines before it reaches its destination, normal serialization requires that you deserialize the object at each step. This, in turn, requires that the necessary classes be available and loaded on each intermediate machine, which is not always possible or desirable.
Marshalled objects can contain a codebase URL where the class code can be found.
When you use a marshalled object, any needed class file is automatically located. PlainContainer.java import java.io. WritePlain.java import java.io. The PlainContainer class is a simple serializable class. The WritePlain and ReadPlain classes test reading and writing an instance of PlainContainer .