playframework/Play20 — pull request #487 by gre (2012-10-17 12:33:47+00:00)
Title: Add Enumerator.outputStream

Enumerator.outputStream creates an Enumerator of bytes with an OutputStream.
**Exemple:** `val (enumerator, outputStream) = Enumerator.outputStream`

It's very useful to work with Java APIs.

Here is a use case:
```
def zip = Action {
val (enumerator, os) = Enumerator.outputStream
val zip = new ZipOutputStream(os)
zip.putNextEntry(new ZipEntry("file1.txt"))
zip.write("hello world".map(_.toByte).toArray)
zip.closeEntry()
zip.close()
Ok(enumerator)
}
```