[#BloombergLP-bdlbb-InBlobStreamBuf] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::InBlobStreamBuf :relfileprefix: ../../ :mrdocs: This class implements the input functionality of the `basic_streambuf` protocol, using a client‐supplied `bdlbb::Blob`. == Synopsis Declared in `<bdlbb_blobstreambuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class InBlobStreamBuf : public std::streambuf ---- == Base Classes [cols="1,4"] |=== | Name| Description | `std::streambuf` | |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/InBlobStreamBuf/2constructor.adoc[`InBlobStreamBuf`] [.small]#[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`. | xref:BloombergLP/bdlbb/InBlobStreamBuf/2destructor.adoc[`~InBlobStreamBuf`] [.small]#[destructor]# [.small]#[virtual]# | Destroy this stream buffer. | xref:BloombergLP/bdlbb/InBlobStreamBuf/currentBufferIndex.adoc[`currentBufferIndex`] | Return the index of the current buffer. The behavior is undefined unless the "streamed" blob has at least one buffer. | xref:BloombergLP/bdlbb/InBlobStreamBuf/data.adoc[`data`] | Return the address of the blob held by this stream buffer. | xref:BloombergLP/bdlbb/InBlobStreamBuf/previousBuffersLength.adoc[`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. | xref:BloombergLP/bdlbb/InBlobStreamBuf/reset.adoc[`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 [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlbb/InBlobStreamBuf/overflow.adoc[`overflow`] [.small]#[virtual]# | Return `traits_type::eof()` unconditionally. | xref:BloombergLP/bdlbb/InBlobStreamBuf/pbackfail.adoc[`pbackfail`] [.small]#[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. | xref:BloombergLP/bdlbb/InBlobStreamBuf/seekoff.adoc[`seekoff`] [.small]#[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. | xref:BloombergLP/bdlbb/InBlobStreamBuf/seekpos.adoc[`seekpos`] [.small]#[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. | xref:BloombergLP/bdlbb/InBlobStreamBuf/showmanyc.adoc[`showmanyc`] [.small]#[virtual]# | Return the number of characters currently available for reading from this stream buffer, or 0 if there are none. | xref:BloombergLP/bdlbb/InBlobStreamBuf/sync.adoc[`sync`] [.small]#[virtual]# | Return 0 unconditionally. | xref:BloombergLP/bdlbb/InBlobStreamBuf/underflow.adoc[`underflow`] [.small]#[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. | xref:BloombergLP/bdlbb/InBlobStreamBuf/xsgetn.adoc[`xsgetn`] [.small]#[virtual]# | Read the specified `numChars` to the specified `destination`. Return the number of characters successfully read. The behavior is undefined unless 0 <= `numChars`. | xref:BloombergLP/bdlbb/InBlobStreamBuf/xsputn.adoc[`xsputn`] [.small]#[virtual]# | Return 0 unconditionally. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#