Re: Q: Applet context streams
Jacob wrote:
Are applet context streams really persistent between
browser sessions? I.e.: start a session, load an applet
which stores information in a file, kill the browser,
restart browser (one week later), load the applet, and
the applet will be able to locate the file?
No.
Although applet contexts are cached, they are transient in nature.
What is the back-end technology that ensures this feature?
Can I be sure it works for all java-enabled browsers on
all platforms and may its behaviour be subject to user
settings on the client side? Where are these files, for
instance on a Linux/Mozilla setup?
There are no files.
Also, why is the API using an InputStream? Seems a bit
odd to *write* to an input stream?
Presumably so the implementation could be changed to support huge
stores. Or perhaps to run on machines with small logical memory sizes.
Having a look at the implementation: don't pass an InputStream which
returns anything less than the entire length from the available or read
methods...
I am trying to implement the java.util.prefs.Preferences
interface by means of applet context streams in order to
store information on the client without the need for applet
signing and explicit user approval, but can't get it to work.
The answers to the above may guide me in the right direction.
I would probably take another direction.
IIRC, preferences doesn't play nicely with JNLP (WebStart) applications,
let alone browser applets. I guess the best approach for that sort of
thing is to use cookies (or move to WebStart and use muffins).
Tom Hawtin