Forums Register Login

Read duplicate keys from properties file

+Pie Number of slices to send: Send
How to read duplicate keys from a properties file.

Thanks.
+Pie Number of slices to send: Send
The properies file cannot have duplicate keys. you can have array of values returned for a supplied key.



the above key1 can return array of values.
+Pie Number of slices to send: Send
If you really want to do something along these lines, you'll have to write the code to read (and perhaps write) the "properties" file yourself. This can be fairly simple, actually. And you'd need some sort of data structure which allows multiple values for a given key - Properties doesn't. You may want to look at org.apache.commons.collections.MultiMap for example. Or use an array for the value, as ak suggests.
[ March 13, 2006: Message edited by: Jim Yingst ]
Once upon a time there were three bears. And they were visted by a golden haired tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 11396 times.
Similar Threads
JDBC-ODBC bridge any other options
Reading multiple keys from properties file
Passing Externally values
Default Properties
comparing the file before i append it to the other
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:02:12.