Documentation Contents

Note: This Java plug-in guide describes features released prior to the Java SE 6 update 10 release. See Java Rich Internet Applications Development and Deployment for the latest information.

< Contents

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

 


Oracle and/or its affiliates Copyright © 1993, 2012, Oracle and/or its affiliates. All rights reserved.
Contact Us