I was trying to use StreamConverters.asOutputStream to create a Source from
a legacy system (Apache POI) that can write to Java OutputStream.
I had something like this, but it didn't work
val source = StreamConverters.asOutputStream().mapMaterializedValue(os =>
report.write(os)
What works is using StramConverters.fromInputStream()
val inputStream = new PipedInputStream()
val outputStream = new PipedOutputStream(ios)
Future{ /** Write to outputStream */ }
val source = StreamConverters.fromInputStream(() => inputStream))
But here, I have this ugly part where I have to manually create a future.
This came in context of Play chunked response.
You can read the whole thread in
https://groups.google.com/forum/#!topic/play-framework/POQ3EuFLmmo
I am wondering, what is the "proper" use of
StramConverters.asOutpitStream() ?
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.