Share via


Channels.NewReadableChannel(Stream) Method

Definition

Constructs a channel that reads bytes from the given stream.

[Android.Runtime.Register("newChannel", "(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;", "")]
public static Java.Nio.Channels.IReadableByteChannel? NewReadableChannel (System.IO.Stream? in);
[<Android.Runtime.Register("newChannel", "(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;", "")>]
static member NewReadableChannel : System.IO.Stream -> Java.Nio.Channels.IReadableByteChannel

Parameters

in
Stream

The stream from which bytes are to be read

Returns

A new readable byte channel

Attributes

Remarks

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.

Java documentation for java.nio.channels.Channels.newChannel(java.io.InputStream).

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