語言

MemoryFile.ReadBytes(Byte[], Int32, Int32, Int32) 方法

定義

從記憶體檔案讀取位元組。

[Android.Runtime.Register("readBytes", "([BIII)I", "GetReadBytes_arrayBIIIHandler")]
public virtual int ReadBytes(byte[]? buffer, int srcOffset, int destOffset, int count);
[<Android.Runtime.Register("readBytes", "([BIII)I", "GetReadBytes_arrayBIIIHandler")>]
abstract member ReadBytes : byte[] * int * int * int -> int
override this.ReadBytes : byte[] * int * int * int -> int

參數

buffer
Byte[]

用來讀取位元組的位元組陣列。

srcOffset
Int32

偏移到記憶體檔案中讀取。

destOffset
Int32

偏移到位元組陣列緩衝區中以便讀取。

count
Int32

需要讀取的位元組數。

傳回

讀取的位元組數。

屬性

例外狀況

如果記憶體檔案已被清除或停用。

備註

從記憶體檔案讀取位元組。 如果檔案被清除,我會丟出 IOException。

Java 文件 android.os.MemoryFile.readBytes(byte[], int, int, int)。

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

適用於