By contrast, the underlying streambuf class is for transferring raw bytes between your program, and input sources or output sinks. Different streambuf subclasses connect to different kinds of sources and sinks.
For more information, see the following documentation’s discussions.