static Properties convertResourceBundleToProperties ( ResourceBundle resource ) { Properties properties = new Properties ( ) ; Enumeration < String > keys = resource . getKeys ( ) ; while ( keys . hasMoreElements ( ) ) { String key = keys . nextElement ( ) ; properties . put ( key , resource . getString ( key ) ) ; } return properties ; }
Convert ResourceBundle into a Properties object .