ByteBuffer.PutInt 方法

定义

重载

名称 说明
PutInt(Int32)

用于编写 int value  的相对 put 方法; (可选操作)

PutInt(Int32, Int32)

用于编写 int value  的绝对 put 方法; (可选操作)

PutInt(Int32)

用于编写 int value  的相对 put 方法; (可选操作)

[Android.Runtime.Register("putInt", "(I)Ljava/nio/ByteBuffer;", "GetPutInt_IHandler")]
public abstract Java.Nio.ByteBuffer PutInt(int value);
[<Android.Runtime.Register("putInt", "(I)Ljava/nio/ByteBuffer;", "GetPutInt_IHandler")>]
abstract member PutInt : int -> Java.Nio.ByteBuffer

参数

value
Int32

要写入的 int 值

返回

此缓冲区

属性

例外

如果位置大于 limit - 4

如果未对此缓冲区的内容进行更改,

注解

用于编写 int value  的相对 put 方法; (可选操作)

将包含给定 int 值的四个字节(按当前字节顺序)写入此缓冲区中的当前位置,然后将位置递增 4。

Java文档java.nio.ByteBuffer.putInt(int)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

PutInt(Int32, Int32)

用于编写 int value  的绝对 put 方法; (可选操作)

[Android.Runtime.Register("putInt", "(II)Ljava/nio/ByteBuffer;", "GetPutInt_IIHandler")]
public abstract Java.Nio.ByteBuffer PutInt(int index, int value);
[<Android.Runtime.Register("putInt", "(II)Ljava/nio/ByteBuffer;", "GetPutInt_IIHandler")>]
abstract member PutInt : int * int -> Java.Nio.ByteBuffer

参数

index
Int32

将写入字节的索引

value
Int32

要写入的 int 值

返回

此缓冲区

属性

例外

如果 index 无效,

如果未对此缓冲区的内容进行更改,

注解

用于编写 int value  的绝对 put 方法; (可选操作)

将包含给定 int 值的四个字节(按当前字节顺序)写入给定索引处的此缓冲区。

Java文档java.nio.ByteBuffer.putInt(int, int)

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于