Use buffer of capacity numBytes as this object's I/O buffer.
Declared in <bdls_fdstreambuf.h>
virtual
FdStreamBuf*
setbuf(
char_type* buffer,
std::streamsize numBytes) override;
Use the specified buffer of the specified numBytes capacity as the input/output buffer for this streambuf. If buffer == 0, the buffer is dynamically allocated with a default size. If both buffer and numBytes are zero a 1-byte buffer is dynamically allocated. The behavior is undefined if any I/O has preceded this call, and unless the buffer is uninitialized before this call.
a pointer to this stream buffer
| Name | Description |
|---|---|
| buffer | buffer to use, or null to allocate dynamically |
| numBytes | capacity of buffer, or 0 for a default size |