FileStream is a commonly used and versatile binary stream class that can be used to read and write individual bytes and blocks of bytes. Because characters are merely encoded bytes, the FileStream class can also be used to stream characters. However, it does not contain the same convenient methods targeted at character streams as do the StreamReader and StreamWriter classes.
The FileStream class can be used to create new files as well as open existing files.
Table 22.5 lists a few of FileStream's class members.
|FileStream class member||Description|
|Close||Closes the stream and releases any associated resources|
|ReadByte||Reads one byte from the stream ...|