Name: joT67522 Date: 08/29/97
ResourceBundle doesn't support resource formats other than .class and .properties.
We found this a bit restrictive since we want to have our own format.
There are two reasons why we want to define our own format:
1) For each key we want to associate it with type and description in addition to value.
2) Some of our resources reside remotely and the default bundle finding algorithm
does not support it.
We could NOT define a new format by extending the ResourceBundle class nor the
PropertyResourceBundle class, as ResourceBundle.findBundle() (private method -
which is called by getBundle()) only knows about these two types.
Ideally, it could be improved in two ways:
1) Seperating the get bundle functionality of ResourceBundle and put it into another
class called BundleFetcher, say, leaving ResourceBundle to do its own job, e.g. getObject(),
getString() etc.
BundleFetcher supports the default resource file formats, i.e. .class and .properties.
2) Define a BundleFinder interface which allows programmers to define their own bundle
finding algorithms, i.e. for their own formats. Instances of BundleFinder can be added
to BundleFetcher, e.g. BundleFetcher.addBundleFinder( myBundleFinder ), so that when
the user calls BundeFetcher.getBundle( "MyResources", frenchLocale ), myBundleFinder
will try to find the bundle in the file format which I define.
I am sure there are other (better) ways to improve ResourceBundle.
company - Lucent Technologies, Bell Labs , email - ###@###.###
======================================================================
###@###.### 11/1/04 01:42 GMT