title: Enumerator vs Iterator in scala and java
body: <p>What is the difference between Enumerator and Iterator? Per my understanding <code>Enumerator</code> is not a fancy alias for <code>enum</code> in Java. Rather, it seems to be a traversal technique similar to an <code>Iterator</code>. So is anyone able to compare and contrast <code>Enumerator</code> and <code>Iterator</code>? Also, I see a usage in <code>Play</code> as </p>
  
  <pre><code>val data = getDataStream
  val dataContent: Enumerator[Array[Byte]] = Enumerator.fromStream(data)
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I am inclined to think that <code>Enumerator</code> gives us actual chunks of data, whereas <code>Iterator</code> gives us pointers to data that is already chunked, such as a list. But I am not convinced that that's the case.</p>