title: Java Properties and lambda collect
body: <p>I have a method that convert Properties into hashmap in this way (i know it's wrong)</p>
  
  <pre><code>Map&lt;String, String&gt; mapProp = new HashMap&lt;String, String&gt;();
  Properties prop = new Properties();
  prop.load(new FileInputStream( path ));     
  
  prop.forEach( (key, value) -&gt; {mapProp.put( (String)key, (String)value );} );
  
  return mapProp;
  </code></pre>
  
  <p>My idea is that mapping in a way like this:</p>
  
  <pre><code>Properties prop = new Properties();
  prop.load(new FileInputStream( path ));
  
  Map&lt;String, String&gt; mapProp = prop.entrySet().stream().collect( /*I don't know*/ );
  
  return mapProp;
  </code></pre>
  
  <p>How write a lambda expression for do that?</p>
  
  <p>Thanks all in advance </p>
  
  <p>Andrea.</p>