title: Pulling values from a Java Properties file in order?
body: <p>I have a properties file where the order of the values is important. I want to be able to iterate through the properties file and output the values based on the order of the original file. </p>
  
  <p>However, since the Properties file is backed by, correct me if I'm wrong, a Map that does not maintain insertion order, <strong>the iterator returns the values in the wrong order</strong>.</p>
  
  <p>Here is the code I'm using</p>
  
  <pre><code>Enumeration names = propfile.propertyNames();
  while (names.hasMoreElements()) {
      String name = (String) names.nextElement();
      //do stuff
  }
  </code></pre>
  
  <p>Is there anyway to get the Properties back in order short of writting my own custom file parser?</p>