[#BloombergLP-bdlbb-InBlobStreamBuf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlbb.adoc[bdlbb]::InBlobStreamBuf
:relfileprefix: ../../
:mrdocs:

This class implements the input functionality of the `basic&lowbar;streambuf` protocol, using a client&hyphen;supplied `bdlbb&colon;&colon;Blob`&period;

== Synopsis

Declared in `&lt;bdlbb&lowbar;blobstreambuf&period;h&gt;`

[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`&period; The behavior is undefined unless `blob` remains valid and externally unmodified for the lifetime of this `streambuf`&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/2destructor.adoc[`&#126;InBlobStreamBuf`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this stream buffer&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/currentBufferIndex.adoc[`currentBufferIndex`] 
| Return the index of the current buffer&period; The behavior is undefined unless the &quot;streamed&quot; blob has at least one buffer&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/data.adoc[`data`] 
| Return the address of the blob held by this stream buffer&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/previousBuffersLength.adoc[`previousBuffersLength`] 
| Return the number of bytes contained in the buffers located before the current one&period; The behavior is undefined unless the &quot;streamed&quot; blob has at least one buffer&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/reset.adoc[`reset`] 
| Reset the get areas&period; Optionally set the underlying `bdlbb&colon;&colon;Blob` value to the optionally specified `blob` if `blob` is not 0&period; The behavior is undefined unless `blob` remains valid and externally unmodified for the lifetime of this `streambuf`&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlbb/InBlobStreamBuf/overflow.adoc[`overflow`]  [.small]#[virtual]#
| Return `traits&lowbar;type&colon;&colon;eof()` unconditionally&period;
| 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()`&period; Return `c` (or `&#126;traits&lowbar;type&colon;&colon;eof` if `c &equals;&equals; traits&lowbar;type&colon;&colon;eof`) on success, and `traits&lowbar;type&colon;&colon;eof()` otherwise&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/seekoff.adoc[`seekoff`]  [.small]#[virtual]#
| Set the location from which the next I&sol;O operation indicated by the optionally specified `which` mode will occur to the specified `offset` position from the location indicated by the specified `fixedPosition`&period; Return the new offset on success, and `off&lowbar;type(&hyphen;1)` otherwise&period; `offset` may be negative&period; Note that this method will fail if `bsl&colon;&colon;ios&lowbar;base&colon;&colon;out` is set&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/seekpos.adoc[`seekpos`]  [.small]#[virtual]#
| Set the location from which the next I&sol;O operation indicated by the optionally specified `which` mode will occur to the specified `position`&period; Return `position` on success, and `off&lowbar;type(&hyphen;1)` otherwise&period; Note that this method will fail if `bsl&colon;&colon;ios&lowbar;base&colon;&colon;out` is set&period;
| 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&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/sync.adoc[`sync`]  [.small]#[virtual]#
| Return 0 unconditionally&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/underflow.adoc[`underflow`]  [.small]#[virtual]#
| Adjust the underlying blob so that the next read position is valid&period; Return the character at `gptr()` on success and `traits&lowbar;type&colon;&colon;eof()` otherwise&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/xsgetn.adoc[`xsgetn`]  [.small]#[virtual]#
| Read the specified `numChars` to the specified `destination`&period; Return the number of characters successfully read&period; The behavior is undefined unless 0 &lt;&equals; `numChars`&period;
| xref:BloombergLP/bdlbb/InBlobStreamBuf/xsputn.adoc[`xsputn`]  [.small]#[virtual]#
| Return 0 unconditionally&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
