BinaryReader.FillBuffer(Int32) Method

Definition

Fills the internal buffer with the specified number of bytes read from the stream.

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)

Parameters

numBytes
Int32

The number of bytes to be read.

Exceptions

The end of the stream is reached before numBytes could be read.

An I/O error occurred.

Requested numBytes is larger than the internal buffer size.

Remarks

The internal buffer size is the larger value between 16 and the value returned by GetMaxByteCount for the specified encoding.

For a list of common I/O tasks, see Common I/O Tasks.

Applies to

See also