class filebuf : public streambuf

The filebuf class is a derived class of streambuf that is specialized for buffered disk file I/O. The buffering is managed entirely within the Microsoft iostream Class Library. filebuf member functions call the run-time low-level I/O routines (the functions declared in IO.H) such as _sopen, _read, and _write.

The file stream classes, ofstream, ifstream, and fstream, use filebuf member functions to fetch and store characters. Some of these member functions are virtual functions defined for the streambuf class.

The reserve area, put area, and get area were introduced in the streambuf class description. The put area and the get area are always the same for filebuf objects. Also, the get pointer and put pointers are tied; when one moves so does the other.

#include <fstream.h>

See Also

ifstream, ofstream, streambuf, strstreambuf, stdiobuf