Java Reference
In-Depth Information
The typical situation that system-level preferences would be used is to store
system-wide defaults when an application is first installed.
10.5.5 Other services
Our brief discussion above describes most of the features of the Preferences API,
including the most typical usage. There are a few other services provided by the
API, such as listeners that listen for preference value changes. These additional
features are less likely to be used, especially in a scientific application. You can
find good documentation of these features in the online Java 2 API specifications
for the java.util.prefs package.
10.5.6 Where is the preferences data really stored?
The actual storage of preferences information is implementation dependent. We
programmers don't need to know where the data is stored, as long as the Prefer-
ences API always works the same on all platforms, which it does. The important
thing to know is that the data really is stored persistently somewhere .
Nevertheless, the curious might want to know where the data is really stored.
In practice, the Sun J2SE implementation on Windows platforms utilizes the
Windows Registry as can be verified by examining the registry. On Solaris and
Linux, the user node is normally stored in a hidden file in the user's home directory.
Other implementations might use directory servers or SQL databases. It really is
implementation dependent. And it really is unimportant.
10.6 The Collections Framework
The Collections Framework was first added in Java 1.2. It includes the original
Vector , Hashtable , and Properties classes from Java 1.0 and also adds
several important classes designed to make handling of “collections” of objects
much easier. We referred to these collections as “object containers” in Chapter 1
(not to be confused with graphics containers in Chapters 6 and 7). We do not
have space to devote to a full discussion of all the interfaces and classes in the
Collections Framework, but we do describe some of the basic functionality. To
quote from the online documentation [4],
The collections framework is a unified architecture for representing and
manipulating collections, allowing them to be manipulated independently of the
details of their representation. It reduces programming effort while increasing
performance. It allows for interoperability among unrelated APIs, reduces effort
in designing and learning new APIs, and fosters software reuse.
Search WWH ::




Custom Search