wood burning stoves 2.0*
The moose likes Java in General and the fly likes ResourceBundle getStringArray() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "ResourceBundle getStringArray()" Watch "ResourceBundle getStringArray()" New topic
Author

ResourceBundle getStringArray()

james render
Ranch Hand

Joined: May 08, 2003
Posts: 72
Can anyone out there tell me how to set up a property in a properties file so that it can be retrieved by the getStringArray method on ResourceBundle object.
I've got a property which has multiple values you see. I've had to resort to using a custom delimiter and manually splitting the results from getString method call.
I've tried having multiple properties with the same name. Or is it that you need to have a special delimiter..
thanks,
James
[ November 10, 2003: Message edited by: james render ]

[SCJP][SCWCD][SCJD]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

The standard ResourceBundle implementation for reading properties from a file is a PropertyResourceBundle, which in turn is a thin wrapper around java.util.Properties, which has no notion of a String array property. To make use of getStringArray(), you'd have to have a subclass of ResourceBundle which did some special parsing of properties to find arrays, and since you would be writing this special implementation, you'd be free to set it up however you'd like.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResourceBundle getStringArray()
 
Similar Threads
How to use getStringArray of ResourceBundle
Properties file with multiple values for same key?????
java.util.Properties & java.util.ResourceBundle
Internationalization : Property vs Resource Bundle?
Download CSV file from apllication server