RFR JDK-8066867: Add InputStream transferTo to transfer content to an OutputStream
Patrick Reinhart
patrick at reini.net
Wed Dec 10 12:43:20 UTC 2014
> Apologies Patrick, that's me who misread you. I assume I had a mix of your
> reply, our recent conversation and David’s question in my head.
No problem
> About your actual reply. That's probably a matter of taste, since nowhere else
> except for this particular method this thing is not used (in java.nio.file.Files
> BUFFER_SIZE const is referenced 3 times).
> It's more like java.io.InputStream#MAX_SKIP_BUFFER_SIZE, which is more of an
> explanatory purpose than anything else, I suppose.
>
You’re right, I would have added such a constant, as it could be used at least twice:
[..]
byte[] buffer = new byte[BUFFER_SIZE];
for (int read; (read = this.read(buffer, 0, BUFFER_SIZE)) > -1;
[..]
> -Pavel
>
>> On 9 Dec 2014, at 23:05, Patrick Reinhart <patrick at reini.net> wrote:
>>
>> You got exactly my point :-) I will try to improve my english and express myself more clearly the next time ;-)
>
-Patrick
More information about the core-libs-dev
mailing list