AsynchronousSocketChannel.Write Method

Definition

Overloads

Write(ByteBuffer, Int64, TimeUnit, Object, ICompletionHandler)

Writes a sequence of bytes to this channel from the given buffer.

Write(ByteBuffer)
Write(ByteBuffer, Object, ICompletionHandler)
Write(ByteBuffer[], Int32, Int32, Int64, TimeUnit, Object, ICompletionHandler)

Writes a sequence of bytes to this channel from a subsequence of the given buffers.

Write(ByteBuffer, Int64, TimeUnit, Object, ICompletionHandler)

Writes a sequence of bytes to this channel from the given buffer.

[Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;JLjava/util/concurrent/TimeUnit;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetWrite_Ljava_nio_ByteBuffer_JLjava_util_concurrent_TimeUnit_Ljava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A" })]
public abstract void Write (Java.Nio.ByteBuffer? src, long timeout, Java.Util.Concurrent.TimeUnit? unit, Java.Lang.Object? attachment, Java.Nio.Channels.ICompletionHandler? handler);
[<Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;JLjava/util/concurrent/TimeUnit;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetWrite_Ljava_nio_ByteBuffer_JLjava_util_concurrent_TimeUnit_Ljava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A" })>]
abstract member Write : Java.Nio.ByteBuffer * int64 * Java.Util.Concurrent.TimeUnit * Java.Lang.Object * Java.Nio.Channels.ICompletionHandler -> unit

Parameters

src
ByteBuffer

The buffer from which bytes are to be retrieved

timeout
Int64

The maximum time for the I/O operation to complete

unit
TimeUnit

The time unit of the timeout argument

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.AsynchronousSocketChannel.write(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, 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

Write(ByteBuffer)

[Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;", "GetWrite_Ljava_nio_ByteBuffer_Handler", ApiSince=26)]
public abstract Java.Util.Concurrent.IFuture? Write (Java.Nio.ByteBuffer? src);
[<Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;)Ljava/util/concurrent/Future;", "GetWrite_Ljava_nio_ByteBuffer_Handler", ApiSince=26)>]
abstract member Write : Java.Nio.ByteBuffer -> Java.Util.Concurrent.IFuture

Parameters

Returns

IFuture

Implements

Attributes

Remarks

Java documentation for java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer).

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

Write(ByteBuffer, Object, ICompletionHandler)

[Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A" })]
public void Write (Java.Nio.ByteBuffer? src, Java.Lang.Object? attachment, Java.Nio.Channels.ICompletionHandler? handler);
[<Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A" })>]
abstract member Write : Java.Nio.ByteBuffer * Java.Lang.Object * Java.Nio.Channels.ICompletionHandler -> unit
override this.Write : Java.Nio.ByteBuffer * Java.Lang.Object * Java.Nio.Channels.ICompletionHandler -> unit

Parameters

attachment
Object

Implements

Attributes

Remarks

Java documentation for java.nio.channels.AsynchronousSocketChannel.write(java.nio.ByteBuffer, 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

Write(ByteBuffer[], Int32, Int32, Int64, TimeUnit, Object, ICompletionHandler)

Writes a sequence of bytes to this channel from a subsequence of the given buffers.

[Android.Runtime.Register("write", "([Ljava/nio/ByteBuffer;IIJLjava/util/concurrent/TimeUnit;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetWrite_arrayLjava_nio_ByteBuffer_IIJLjava_util_concurrent_TimeUnit_Ljava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)]
[Java.Interop.JavaTypeParameters(new System.String[] { "A" })]
public abstract void Write (Java.Nio.ByteBuffer[]? srcs, int offset, int length, long timeout, Java.Util.Concurrent.TimeUnit? unit, Java.Lang.Object? attachment, Java.Nio.Channels.ICompletionHandler? handler);
[<Android.Runtime.Register("write", "([Ljava/nio/ByteBuffer;IIJLjava/util/concurrent/TimeUnit;Ljava/lang/Object;Ljava/nio/channels/CompletionHandler;)V", "GetWrite_arrayLjava_nio_ByteBuffer_IIJLjava_util_concurrent_TimeUnit_Ljava_lang_Object_Ljava_nio_channels_CompletionHandler_Handler", ApiSince=26)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "A" })>]
abstract member Write : Java.Nio.ByteBuffer[] * int * int * int64 * Java.Util.Concurrent.TimeUnit * Java.Lang.Object * Java.Nio.Channels.ICompletionHandler -> unit

Parameters

srcs
ByteBuffer[]

The buffers from which bytes are to be retrieved

offset
Int32

The offset within the buffer array of the first buffer from which bytes are to be retrieved; must be non-negative and no larger than srcs.length

length
Int32

The maximum number of buffers to be accessed; must be non-negative and no larger than srcs.length - offset

timeout
Int64

The maximum time for the I/O operation to complete

unit
TimeUnit

The time unit of the timeout argument

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.AsynchronousSocketChannel.write(java.nio.ByteBuffer[], int, int, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler<java.lang.Long, ? 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