Re: IO-753

2021-10-09 Thread Rob Spoor
Just a warning about threads: if this is to be used in Java EE, you are not allowed to spawn your own threads. It would be better if the API can accept an Executor or ExecutorService. That way, JEE applications can provide a ManagedExecutorService (which extends ExecutorService). With no provid

Re: IO-753

2021-10-09 Thread Gary Gregory
Well, let's see what that would look like in a PR :-) There is a precedent for using threads in Commons IO, see: - https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/input/Tailer.java - https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/comm

Re: IO-753

2021-10-09 Thread sebastian . dietrich
Sure that is possible with PipedI/OStreams - and I would rely on that or QueueI/OStream (that should need no extra thread) in the implementation. But that (relying on rather simple implementation based on java.io) is as well true for the existing IOUtils.copy methods. Like with the other IOUtils

Re: IO-753

2021-10-09 Thread Rob Spoor
Isn't this already possible with PipedOutputStream and PipedOutputStream? PipedInputStream inputStream = new PipedInputStream(size); PipedOutputStream outputStream = new PipedOutputStream(inputStream); Any write to outputStream is now visible in inputStream. Note that the writing and re

IO-753

2021-10-09 Thread sebastian . dietrich
Hi! I'd like to contribute to https://issues.apache.org/jira/browse/IO-753 "Provide a IOUtils.copy(OutputStream, InputStream)" AFAIK this not possible without an extra thread which might be seen as too "heavy" for commons-io. So my question is: Is there any chance that such a PR will be acc