AsynchronousFileChannel.Read Method

Definition

Overloads

Read(ByteBuffer, Int64)

Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.

Read(ByteBuffer, Int64, Object, ICompletionHandler)

Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.

Read(ByteBuffer, Int64)

Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.

[Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;J)Ljava/util/concurrent/Future;", "GetRead_Ljava_nio_ByteBuffer_JHandler", ApiSince=26)]
public abstract Java.Util.Concurrent.IFuture? Read (Java.Nio.ByteBuffer? dst, long position);
[<Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;J)Ljava/util/concurrent/Future;", "GetRead_Ljava_nio_ByteBuffer_JHandler", ApiSince=26)>]
abstract member Read : Java.Nio.ByteBuffer * int64 -> Java.Util.Concurrent.IFuture

Parameters

dst
ByteBuffer

The buffer into which bytes are to be transferred

position
Int64

The file position at which the transfer is to begin; must be non-negative

Returns

IFuture

A Future object representing the pending result

Attributes

Remarks

Java documentation for java.nio.channels.AsynchronousFileChannel.read(java.nio.ByteBuffer, long).

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

Read(ByteBuffer, Int64, Object, ICompletionHandler)

Reads a sequence of bytes from this channel into the given buffer, starting at the given file position.

[Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;JLjava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetRead_Ljava_nio_ByteBuffer_JLjava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A" })]
public abstract void Read (Java.Nio.ByteBuffer? dst, long position, Java.Lang.Object? attachment, Java.Nio.Channels.ICompletionHandler? handler);
[<Android.Runtime.Register("read", "(Ljava/nio/ByteBuffer;JLjava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetRead_Ljava_nio_ByteBuffer_JLjava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A" })>]
abstract member Read : Java.Nio.ByteBuffer * int64 * Java.Lang.Object * Java.Nio.Channels.ICompletionHandler -> unit

Parameters

dst
ByteBuffer

The buffer into which bytes are to be transferred

position
Int64

The file position at which the transfer is to begin; must be non-negative

attachment
Object

The object to attach to the I/O operation; can be null

handler
ICompletionHandler

The handler for consuming the result

Attributes

Remarks

Java documentation for java.nio.channels.AsynchronousFileChannel.read(java.nio.ByteBuffer, long, A, java.nio.channels.CompletionHandler<java.lang.Integer, ? super A>).

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