語言

MifareClassic.WriteBlock(Int32, Byte[]) 方法

定義

寫入 16 位元組區塊。

[Android.Runtime.Register("writeBlock", "(I[B)V", "")]
public void WriteBlock(int blockIndex, byte[]? data);
[<Android.Runtime.Register("writeBlock", "(I[B)V", "")>]
member this.WriteBlock : int * byte[] -> unit

參數

blockIndex
Int32

區塊的索引,從 0 開始寫入

data
Byte[]

需寫入 16 位元組的資料

屬性

例外狀況

如果標籤離開欄位

若發生 I/O 失敗或操作被取消

備註

寫入 16 位元組區塊。

這是一個輸入輸出操作,會阻塞直到完成。 它不能從主應用程式執行緒呼叫。 如果#close是從其他執行緒呼叫,則被封鎖的通話會被取消IOException。

需要 android.Manifest.permission#NFC 權限。

Java 文件 android.nfc.tech.MifareClassic.writeBlock(int, byte[])。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於