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

Applet Persistence API - Java 2 SDK v1.4.2, Java 2 SDK 英文文档


Applet Persistence API



Beginning with Java2 SKD, Standard Edition v 1.4, two new methods have been added to interface AppletContext.java to allow applet persistence across browser sessions. These methods are:

These new methods enable the applet developer to stream data and objects from one browser session so that they can be reused in subsequent browser sessions. This provides applet persistence and makes it unnecessary to use static objects in applets for this same purpose.

setStream(key, stream) maps a key to a stream. getStream(key) returns the stream mapped to the key. If the AppletContext already has a stream mapped to the key when setStream(key, stream) is invoked, the mapping is updated.

See the API specification for more information