It all looks fine except the last sentence:
>
> When reading, the end of file can be detected by noting
> that the amount of data read is less than the amount requested.
>
Aren't there other conditions that can also cause this to occur; e.g.,
device error or timeout? Perhaps one or two more sentences
discussing error conditions would be useful.
- Richard F.