Share via


ISeekableByteChannel.Write(ByteBuffer) Method

Definition

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

[Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;)I", "GetWrite_Ljava_nio_ByteBuffer_Handler:Java.Nio.Channels.ISeekableByteChannelInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public int Write (Java.Nio.ByteBuffer? src);
[<Android.Runtime.Register("write", "(Ljava/nio/ByteBuffer;)I", "GetWrite_Ljava_nio_ByteBuffer_Handler:Java.Nio.Channels.ISeekableByteChannelInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member Write : Java.Nio.ByteBuffer -> int

Parameters

Returns

Implements

Attributes

Remarks

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

Bytes are written starting at this channel's current position, unless the channel is connected to an entity such as a file that is opened with the java.nio.file.StandardOpenOption#APPEND APPEND option, in which case the position is first advanced to the end. The entity to which the channel is connected is grown, if necessary, to accommodate the written bytes, and then the position is updated with the number of bytes actually written. Otherwise this method behaves exactly as specified by the WritableByteChannel interface.

Java documentation for java.nio.channels.SeekableByteChannel.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