Sdílet prostřednictvím


SelectionKey.IsReadable Property

Definition

Tests whether this key's channel is ready for reading.

public bool IsReadable { [Android.Runtime.Register("isReadable", "()Z", "")] get; }
[<get: Android.Runtime.Register("isReadable", "()Z", "")>]
member this.IsReadable : bool

Property Value

true if, and only if, readyOps() & OP_READ is nonzero

Attributes

Exceptions

if the key has already been canceled.

Remarks

Tests whether this key's channel is ready for reading.

An invocation of this method of the form k.isReadable() behaves in exactly the same way as the expression

<blockquote>

{@code
            k.readyOps() & OP_READ != 0
            }

</blockquote>

If this key's channel does not support read operations then this method always returns false.

Java documentation for java.nio.channels.SelectionKey.isReadable().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to