You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/03/09 00:34:20 UTC
DO NOT REPLY [Bug 17809] New: -
Add MapUtils.loadProperties() method
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17809>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17809
Add MapUtils.loadProperties() method
Summary: Add MapUtils.loadProperties() method
Product: Commons
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: Other
Component: Collections
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: dgraham@apache.org
I've written a utility class that has 2 methods that load a Properties object
from a file name. PropertiesUtil.loadProperties(ClassLoader loader, String
file) translates a properties file name into something the ClassLoader can use
and returns a Properties object loaded from the given file name.
Usage:
try {
Properties p = PropertiesUtil.loadProperties("org.apache.commons.MyProps");
} catch (IOException e) {
...
}
The 2 methods in this class could be added to MapUtils to make it easier to load
properties files.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org