BloombergLP::bdlbb::InBlobStreamBuf

This class implements the input functionality of the basic_streambuf protocol, using a client-supplied bdlbb::Blob.

Synopsis

Declared in <bdlbb_blobstreambuf.h>

class InBlobStreamBuf
    : public std::streambuf

Base Classes

NameDescription
std::streambuf

Member Functions

NameDescription
InBlobStreamBuf [constructor]Create a BlobStreamBuf using the specified blob. The behavior is undefined unless blob remains valid and externally unmodified for the lifetime of this streambuf.
~InBlobStreamBuf [destructor] [virtual]Destroy this stream buffer.
currentBufferIndex Return the index of the current buffer. The behavior is undefined unless the "streamed" blob has at least one buffer.
data Return the address of the blob held by this stream buffer.
previousBuffersLength Return the number of bytes contained in the buffers located before the current one. The behavior is undefined unless the "streamed" blob has at least one buffer.
reset Reset the get areas. Optionally set the underlying bdlbb::Blob value to the optionally specified blob if blob is not 0. The behavior is undefined unless blob remains valid and externally unmodified for the lifetime of this streambuf.

Protected Member Functions

NameDescription
overflow [virtual]Return traits_type::eof() unconditionally.
pbackfail [virtual]Adjust the underlying blob and put the optionally specified character c at the newly valid gptr(). Return c (or ~traits_type::eof if c == traits_type::eof) on success, and traits_type::eof() otherwise.
seekoff [virtual]Set the location from which the next I/O operation indicated by the optionally specified which mode will occur to the specified offset position from the location indicated by the specified fixedPosition. Return the new offset on success, and off_type(-1) otherwise. offset may be negative. Note that this method will fail if bsl::ios_base::out is set.
seekpos [virtual]Set the location from which the next I/O operation indicated by the optionally specified which mode will occur to the specified position. Return position on success, and off_type(-1) otherwise. Note that this method will fail if bsl::ios_base::out is set.
showmanyc [virtual]Return the number of characters currently available for reading from this stream buffer, or 0 if there are none.
sync [virtual]Return 0 unconditionally.
underflow [virtual]Adjust the underlying blob so that the next read position is valid. Return the character at gptr() on success and traits_type::eof() otherwise.
xsgetn [virtual]Read the specified numChars to the specified destination. Return the number of characters successfully read. The behavior is undefined unless 0 <= numChars.
xsputn [virtual]Return 0 unconditionally.