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

Applet Persistence API - JDK 5 Documentation v6.0, Java 2 SDK 英文文档


Applet Persistence API



Beginning with JDK 1.4, two new methods have been added to interface java.Applet.AppletContext 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