From 74121930e33686d2452170554776c0901f622d3e Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Wed, 26 Jul 2023 15:07:18 +0000 Subject: [PATCH] 4800398: (ch spec) Clarify Channels.newChannel(InputStream) spec Reviewed-by: alanb --- src/java.base/share/classes/java/nio/channels/Channels.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java.base/share/classes/java/nio/channels/Channels.java b/src/java.base/share/classes/java/nio/channels/Channels.java index df8d2d45eec..80314d7447f 100644 --- a/src/java.base/share/classes/java/nio/channels/Channels.java +++ b/src/java.base/share/classes/java/nio/channels/Channels.java @@ -260,8 +260,10 @@ public final class Channels { * Constructs a channel that reads bytes from the given stream. * *

The resulting channel will not be buffered; it will simply redirect - * its I/O operations to the given stream. Closing the channel will in - * turn cause the stream to be closed.

+ * its I/O operations to the given stream. Reading from the resulting + * channel will read from the input stream and thus block until input is + * available or end of file is reached. Closing the channel will in turn + * cause the stream to be closed.

* * @param in * The stream from which bytes are to be read