RFR: 4800398: (ch spec) Clarify Channels.newChannel(InputStream) spec [v2]
Alan Bateman
alanb at openjdk.org
Fri Jul 21 16:29:41 UTC 2023
On Fri, 21 Jul 2023 15:43:07 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Clarify that the `ReadableByteChannel` returned by `Channels::newChannel` is in blocking mode.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 4800398: Revise verbiage update per Reviewer suggestion
src/java.base/share/classes/java/nio/channels/Channels.java line 264:
> 262: * <p> The resulting channel will not be buffered; it will simply redirect
> 263: * its I/O operations to the given stream. Reading from the resulting
> 264: * channel will read from the input stream hence might block. Closing the
A suggestion is to replace "will read from the input stream hence might block" with "will read from the input stream and thus block until input is available or end of file is reached", would that work?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14961#discussion_r1270865805
More information about the nio-dev
mailing list