Here you can find the source of propertiesToMap(Properties props)
public static Map<String, String> propertiesToMap(Properties props)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Map<String, String> propertiesToMap(Properties props) { Map<String, String> map = new HashMap<>(); for (String key : props.stringPropertyNames()) { String value = props.getProperty(key); map.put(key, value);/*w ww .j av a 2 s.co m*/ } return map; } }