Method: BSON::ByteBuffer#to_s

Defined in:

#to_sString

Returns the contents of the buffer as a binary string.

If the buffer is used for reading, the returned contents is the data that was not yet read. If the buffer is used for writing, the returned contents is the complete data that has been written so far.

Note: this method copies the buffer’s contents into a newly allocated String instance. It does not return a reference to the data stored in the buffer itself.

Returns: