当前位置: 首页>>代码示例>>Java>>正文


Java PropertyResourceBundle.keySet方法代码示例

本文整理汇总了Java中java.util.PropertyResourceBundle.keySet方法的典型用法代码示例。如果您正苦于以下问题:Java PropertyResourceBundle.keySet方法的具体用法?Java PropertyResourceBundle.keySet怎么用?Java PropertyResourceBundle.keySet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.util.PropertyResourceBundle的用法示例。


在下文中一共展示了PropertyResourceBundle.keySet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createKeyValueArray

import java.util.PropertyResourceBundle; //导入方法依赖的package包/类
private final String[] createKeyValueArray(PropertyResourceBundle b) {
    List<String> keyValueList = new ArrayList<String>();
    StringBuilder sb = new StringBuilder();

    for (String key : b.keySet()) {
        sb.setLength(0);
        sb.append(key);
        sb.append(" = ");
        sb.append(b.getString(key));
        keyValueList.add(sb.toString());
    }

    String[] keyValueArray = keyValueList.toArray(new String[0]);
    Arrays.sort(keyValueArray);
    return keyValueArray;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:17,代码来源:Bug6204853.java

示例2: generatePropertiesMap

import java.util.PropertyResourceBundle; //导入方法依赖的package包/类
private void generatePropertiesMap(String propertiesFile) {
	try {
		if (!new File(path+"/"+propertiesFile).exists()) return;
		FileInputStream fileInputStream = new FileInputStream(path+"/"+propertiesFile);
		PropertyResourceBundle propertyResourceBundle = new PropertyResourceBundle(fileInputStream);
		for(String s : propertyResourceBundle.keySet()){
			properties.put(s, new String(propertyResourceBundle.getString(s).getBytes("ISO-8859-1"),"UTF-8"));
		}
	} catch (Exception e) {
		FLog.e("error trying to read properties file", e);
	}
}
 
开发者ID:FAIMS,项目名称:faims-android,代码行数:13,代码来源:Arch16n.java

示例3: loadPluginResources

import java.util.PropertyResourceBundle; //导入方法依赖的package包/类
private void loadPluginResources(String resourceName, ResourceType type) {
    try {
        PropertyResourceBundle prbPlugin = (PropertyResourceBundle) ResourceBundle.getBundle(resourceName,
                Locale.getDefault(), classLoader);
        for (String key : prbPlugin.keySet()) {
            PluginRes.putRes(key, prbPlugin.getString(key), type);
        }
    } catch (Exception ex) {
        Log.debug(resourceName + "is not overwritten in plugin ");
    }
}
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:12,代码来源:PluginManager.java

示例4: loadConfigurationFrom

import java.util.PropertyResourceBundle; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Configuration loadConfigurationFrom(InputStream input) throws IOException, HorizonDBException {

    PropertyResourceBundle resourceBundle = new PropertyResourceBundle(input);

    Builder builder = Configuration.newBuilder();

    for (String key : resourceBundle.keySet()) {

        setProperty(builder, key, resourceBundle.getString(key));
    }

    return builder.build();
}
 
开发者ID:blerer,项目名称:horizondb,代码行数:18,代码来源:PropertiesFileConfigurationLoader.java


注:本文中的java.util.PropertyResourceBundle.keySet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。