Skip to content

Commit a180a38

Browse files
author
Hamlin Li
committed
8260694: (fc) Clarify FileChannel.transferFrom to better describe "no bytes available" case
Reviewed-by: alanb
1 parent 1b0c36b commit a180a38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/java.base/share/classes/java/nio/channels/FileChannel.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ public abstract long transferTo(long position, long count,
642642
* number of bytes will be transferred if the source channel has fewer than
643643
* {@code count} bytes remaining, or if the source channel is non-blocking
644644
* and has fewer than {@code count} bytes immediately available in its
645-
* input buffer.
645+
* input buffer. No bytes are transferred, and zero is returned, if the
646+
* source has reached end-of-stream.
646647
*
647648
* <p> This method does not modify this channel's position. If the given
648649
* position is greater than the file's current size then no bytes are

0 commit comments

Comments
 (0)