8260694: (fc) Clarify FileChannel.transferFrom to better describe "no bytes available" case

Reviewed-by: alanb
This commit is contained in:
Hamlin Li 2021-02-19 12:35:35 +00:00
parent 1b0c36b05b
commit a180a38618

View file

@ -642,7 +642,8 @@ public abstract class FileChannel
* number of bytes will be transferred if the source channel has fewer than
* {@code count} bytes remaining, or if the source channel is non-blocking
* and has fewer than {@code count} bytes immediately available in its
* input buffer.
* input buffer. No bytes are transferred, and zero is returned, if the
* source has reached end-of-stream.
*
* <p> This method does not modify this channel's position. If the given
* position is greater than the file's current size then no bytes are