[
https://issues.apache.org/jira/browse/IO-753?focusedWorklogId=666969&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-666969
]
ASF GitHub Bot logged work on IO-753:
-------------------------------------
Author: ASF GitHub Bot
Created on: 19/Oct/21 13:03
Start Date: 19/Oct/21 13:03
Worklog Time Spent: 10m
Work Description: garydgregory commented on a change in pull request #281:
URL: https://github.com/apache/commons-io/pull/281#discussion_r731842874
##########
File path: src/test/java/org/apache/commons/io/IOUtilsCopyTest.java
##########
@@ -80,6 +80,22 @@ public void testCopy_inputStreamToOutputStream() throws
Exception {
assertEquals(inData.length,count);
}
+ @SuppressWarnings("resource") // 'in' is deliberately not closed
+ @Test
+ public void testCopy_byteArrayOutputStreamToInputStream() throws Exception
{
+ final java.io.ByteArrayOutputStream out = new
java.io.ByteArrayOutputStream();
Review comment:
Gotcha, please see the other comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 666969)
Remaining Estimate: 0h
Time Spent: 10m
> Provide a IOUtils.copy(OutputStream, InputStream)
> -------------------------------------------------
>
> Key: IO-753
> URL: https://issues.apache.org/jira/browse/IO-753
> Project: Commons IO
> Issue Type: New Feature
> Components: Utilities
> Affects Versions: 2.11.0
> Reporter: Sebastian Dietrich
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)