Hi Paul, Attached a patch containing my complete proposed code including tests.
Patrick > Am 24.11.2014 um 18:03 schrieb Patrick Reinhart <patr...@reini.net>: > > Well I will then suggest using IOUtils with two simple methods: > > public static long copy(InputStream source, OutputStream target) > > public static long copy(Readable source, Appendable target) > > >>>> >>>> To speed things along for now i recommend creating a new class say IOUtils >>>> or preferably ByteStreams. >>> >>> Hmm, in the case of Reader/Writer ByteStreams seams to be a bit confusing >>> for me, should then the reader copy stuff go to also a separate class like >>> „CharStreams“. Locally I created an implementation named „IOUtils“ >>> containing a copy method for InputStream to OutputStream. >>> >> >> Pick the one you prefer so we don't rat hole down the naming abyss :-) >> >> Pavel, your point about the overload with j.u.stream.Stream is a reasonable >> one (I am not too concerned by it myself). I hope one day in the future we >> can have Stream<int> :-) >> >> Paul. > > Patrick