Here you can find the source of convertResourceBundleToProperties(ResourceBundle resource)
public static Properties convertResourceBundleToProperties(ResourceBundle resource)
//package com.java2s; import java.util.*; public class Main { public static Properties convertResourceBundleToProperties(ResourceBundle resource) { Properties properties = null; if (resource != null) { properties = new Properties(); Enumeration<String> keys = resource.getKeys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); properties.put(key, resource.getString(key)); }/*from ww w . ja va 2s . c o m*/ } return properties; } }