Hello honorable forum,
I'm building a ResourceBundle from a file, this bundle holds < String, String> values.
InputStream in = getClass().getResourceAsStream("SQL.properties");
properties = new PropertyResourceBundle(in);
in.close();
I would like to add/replace on this bundle some properties that I'm passing from the command line using -Dsome.option.val.NAME1=HiEarth
I don't care dumping the old bundle and creating a new one instead.
Could you please tip?
I think that what I need to do is :
- Create from the bundle a HashMap< String, String>
- Replace values.
- Transform the HashMap into a InputStream. //This is the complicated part...
- Build the new bundle from that.