This documentation is archived and is not being maintained.

BinaryReader.FillBuffer Method

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

[Visual Basic]
Protected Overridable Sub FillBuffer( _
   ByVal numBytes As Integer _
)
[C#]
protected virtual void FillBuffer(
 int numBytes
);
[C++]
protected: virtual void FillBuffer(
 int numBytes
);
[JScript]
protected function FillBuffer(
   numBytes : int
);

Parameters

numBytes
The number of bytes to be read.

Exceptions

Exception Type Condition
EndOfStreamException The end of the stream is reached before numBytes could be read.
IOException An I/O error occurs.

Remarks

The following table lists examples of other typical or related I/O tasks.

To do this... See the example in this topic...
Create a text file. Writing Text to a File
Write to a text file. Writing Text to a File
Read from a text file. Reading Text from a File
Read from a binary file. Reading and Writing to a Newly Created Data File
Write to a binary file. Reading and Writing to a Newly Created Data File

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

BinaryReader Class | BinaryReader Members | System.IO Namespace | Working with I/O | Reading Text from a File | Writing Text to a File

Show: