Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.11.0
-
None
Description
We already have several copy(InputStream, OutputStream) methods, but often the other way round is necessary - i.e. providing an InputStream on data provided by an OutputStream.
This is e.g. the case when one is using a serialization library (for example, serializing to JSON) and a transport layer (say, Tomcat) which takes an InputStream. So you need to pipe the OutputStream from JSON over an HTTP connection which wants to read from an InputStream.
My particular use-case is that I want to provide an Excel file (generated via POI) at my web-application. POI can write a workbook to an OutputStream, but I need to provide that Excel as an InputStream to my Web-Framework (Vaadin), so users can download it.