bool set(char *buffer, unsigned int len, bool copy) bool set(const char *buffer, unsigned int len, bool copy) bool set(const std::string &buffer)
Sets the input source of this stream based on the specified parameters. The
buffer
parameter specifies the data string to be used as the input
source. If the char *
constructors are used, the length of the input
buffer must be specified as well as whether or not a local copy of the buffer
should be made and used as the input source. If the std::string
method
is used, a local copy of the input string will be made and used as the input
source.
Regardless of whether or not a local copy is made, the stream takes no responsibility for the management of the original input source's memory.