Java tutorial
//package com.java2s; import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.Set; import java.util.Map.Entry; public class Main { public static Map<String, String> propertiesAsMap(Properties properties) { Set<Entry<Object, Object>> entries = properties.entrySet(); Map<String, String> responseMap = new HashMap<String, String>(); for (Entry<Object, Object> entry : entries) { responseMap.put((String) entry.getKey(), (String) entry.getValue()); } return responseMap; } }