This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

ResourceBundle getStringArray()  RSS feed

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
author and iconoclast
Sheriff
Posts: 24220
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!