On Fri, 16 Oct 2026 14:14:24 GMT, Alan Bateman <[email protected]> wrote:
> > Is `Channels.newInputStream` on a non-blocking channel a useful > > construction? The doc of `Channels.newInputStream` specifies `read` will > > throw if the channel is in non-blocking mode. > > InputStream can't be reliably implemented on a non-blocking source, at least > not without retry under the covers in order to adhere to the contract of the > read methods. For SelectableChannel configured non-blocking then the > implementation can eagerly throw IBME. The context for the bug report is > ReadableByteChannel that is not a SelectableChannel. Is there a different bug report than https://bugs.openjdk.org/browse/JDK-8387022? That one mentions `ChannelInputStream`, but I don't see a discusison of the `ReadableByteChannel`/`SelectableChannel` nuances. ------------- PR Comment: https://git.openjdk.org/jdk/pull/33401#issuecomment-6218920446
