BinaryReader.FillBuffer(Int32) 方法

定義

會用指定數量的位元組填滿內部緩衝區。

protected:
 virtual void FillBuffer(int numBytes);
protected virtual void FillBuffer(int numBytes);
abstract member FillBuffer : int -> unit
override this.FillBuffer : int -> unit
Protected Overridable Sub FillBuffer (numBytes As Integer)

參數

numBytes
Int32

要讀取的位元組數。

例外狀況

溪流的終點在被閱讀前 numBytes 就已抵達。

發生 I/O 錯誤。

請求 numBytes 的大小大於內部緩衝區大小。

備註

內部緩衝區大小是指 16 與指定編碼中返回 GetMaxByteCount 的較大值。

關於常見 I/O 任務的清單,請參見 Common I/O 任務

適用於

另請參閱