Library enhancement proposal for copying data from/to Reader/Writer InputStream/OutputStream

Patrick Reinhart patrick at
Fri Nov 28 20:13:10 UTC 2014

> Am 28.11.2014 um 20:15 schrieb Bernd Eckenfels <ecki at>:
> Am Fri, 28 Nov 2014 12:09:11 +0000
> schrieb Pavel Rappo <pavel.rappo at>:
>> I'm happy with any tool which is capable of "usages search".
>> Configured IDE is a good choice.
> What usage would you actually search in the OpenJDK code base?
> I think it is not very representative to search for usage in the JDK
> code base even if it would be possible. However you can use for commons
> IO or Guava. Both have those helpers. (Which initself might be
> justification enough - the question is only pro or con including it in
> JCL :) 
> Gruss
> Bernd

When looking at the guava library there seems to be no need for copy method that is able to pass in a separate byte array or CharBuffer. It would make more sense to have also a copy channels method on the existing java.nio.channels.Channels class instead.

In all the projects I have worked on, there was always the point of having to either implement my own copy methods or use a certain library (for mostly only using the copy methods). Having said that, it seems to be a natural fit.  Also when looking on the java.nio.files.Files class for copying with source or target Path’s it makes even more sense.


More information about the core-libs-dev mailing list