Getting particular keys against a given regular expression from a resource bundle
Hi I am using resource bundle from propertied file to fetch keys and values, like f开发者_如何学编程ollowing:
ResourceBundle resouce = ResourceBundle.getBundle("", Locale.getDefault()); Enumeration bundleKeys = resouce.getKeys();
Above code fetches all the keys which is time taking. I want to fetch particular keys with some format. e.g. keys starting with a particular keyword.
Thanks.
I don't think there is a high-level API for this (at least not in the JDK).
Why do you think you need this? What are you trying to solve? Maybe there is another way...
精彩评论