站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Externalization with an NonExternalizable SuperClass - JDK 5 Documentation v1.2.2, Java 2 SDK 英文文档

Exernalization with an NonExternalizable SuperClass

Abstract

When using the Externalizable interface, an externalizable object must implement a writeExternal method to save the state of the object and a readExternal method to restore the state of the object. The externalizable object must also coordinate with its supertype to save and restore its state.

This example demonstrates how an object saves and restores the state of its nonexternalizable supertype. When the supertype of an externalizable object is not externalizable, the subclass object must explicitly save and restore the state of the fields of the superclass in its own writeExternal and readExternal methods.

Additional Information:

Source Files
Running the Example
List of Examples