Re: java.util.prefs.Preferences and arrays
Supersedes: <Preferences-20071229060807@ram.dialup.fu-berlin.de>
Roedy Green <see_website@mindprod.com.invalid> writes:
java.util.prefs.Preferences does not seem to be designed to store
multiple copies of each field (i.e. arrays).
The documentation at
http://download.java.net/jdk7/docs/api/java/util/prefs/Preferences.html
does not use the term ?field? in this regard.
You might refer to the value of a key.
Since I do not understand ?multiple copies of each field?, but
since you mention arrays, I assume that you ask how to store
an array as the value of a key.
You might serialize the array to a string or a byte array and
then store this string or byte array, respectively.
Do you look for some unique data value to use as key, load and sort?
without recording the index?
The documentation at
http://download.java.net/jdk7/docs/api/java/util/prefs/Preferences.html
does not use the term ?index?.
I can not comprehend what you refer to with ?the index?.
The key can be a string. Choose it as you choose any
other identifier, e.g., a variable name, when you write code.