On Thu, 29 Jul 2021 19:57:30 GMT, Markus KARG 
<github.com+1701815+mk...@openjdk.org> wrote:

>> Good point.
>
> :-)

Is this loop correct for the case that the channel gets truncated? In that case 
transferTo will return 0 as no bytes will be transferred and I'm concerned this 
code will go into an infinite loop.

Also can you can check that IllegalBlockingModeException is thrown for the case 
ch is a SelectableChannel configured non-blocking and the destination is a 
FileChannel?

Just on naming, the existing channel implementations use "dst" for the 
destination and "wbc" (not "oc") for writable byte channels. Just mentioning it 
so that the new code can be kept consistent where possible.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4263

Reply via email to