RFR: JDK-8260694: (fc) Add apiNote to FileChannel.transferFrom to better describe "no bytes available" case [v4]
Hamlin Li
mli at openjdk.java.net
Thu Feb 4 12:05:07 UTC 2021
On Wed, 3 Feb 2021 14:07:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
>>
>> JDK-8260694: (fc) Add apiNote to FileChannel.transferFrom to better describe "no bytes available" case
>
> src/java.base/share/classes/java/nio/channels/FileChannel.java line 646:
>
>> 644: * and has fewer than {@code count} bytes immediately available in its
>> 645: * input buffer. No bytes are transferred if the source channel has reached
>> 646: * the end-of-stream in which case zero will be returned.
>
> Thanks for dropping the apiNote that mentions -1 and return value.
>
> The update is mostly okay, I might re-word it slightly to "No bytes are transferred, and zero is returned, if the source has reached end-of-stream".
Thanks Alan, just modified as you suggested, I think it's better.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2329
More information about the nio-dev
mailing list