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 任务的列表,请参阅 常见 I/O 任务

适用于

另请参阅