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

In&hyphen;core container for `BlobBuffer` objects&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Blob;
----

== Description

`Blob` is an in&hyphen;core container for `BlobBuffer` objects&period; This class is exception&hyphen;neutral with no guarantee of rollback&colon; if an exception is thrown during the invocation of a method on a pre&hyphen;existing instance, the container is left in a valid state, but its value is undefined&period; In no event is memory leaked&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlbb/Blob/2constructor-07.adoc[`Blob`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlbb/Blob/2destructor.adoc[`&#126;Blob`] [.small]#[destructor]#
| Destroy this blob&period;
| xref:BloombergLP/bdlbb/Blob/operator_assign-0d.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlbb/Blob/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period;
| xref:BloombergLP/bdlbb/Blob/appendBuffer-00.adoc[`appendBuffer`] 
| `appendBuffer` overloads
| xref:BloombergLP/bdlbb/Blob/appendDataBuffer-04.adoc[`appendDataBuffer`] 
| `appendDataBuffer` overloads
| xref:BloombergLP/bdlbb/Blob/buffer.adoc[`buffer`] 
| Return a reference to the non&hyphen;modifiable blob buffer at `index`&period;
| xref:BloombergLP/bdlbb/Blob/factory.adoc[`factory`] 
| Return the factory used by this object&period;
| xref:BloombergLP/bdlbb/Blob/insertBuffer-0d.adoc[`insertBuffer`] 
| `insertBuffer` overloads
| xref:BloombergLP/bdlbb/Blob/lastDataBufferLength.adoc[`lastDataBufferLength`] 
| Return the length of the last blob buffer in this blob, or 0 if this blob is of 0 length&period;
| xref:BloombergLP/bdlbb/Blob/length.adoc[`length`] 
| Return the length of this blob&period;
| xref:BloombergLP/bdlbb/Blob/moveAndAppendDataBuffers.adoc[`moveAndAppendDataBuffers`] 
| Append to this blob by moving the data buffers held by `srcBlob`&period;
| xref:BloombergLP/bdlbb/Blob/moveBuffers.adoc[`moveBuffers`] 
| Replace this blob&apos;s buffers by moving all buffers from `srcBlob`&period;
| xref:BloombergLP/bdlbb/Blob/moveDataBuffers.adoc[`moveDataBuffers`] 
| Replace this blob&apos;s buffers by moving the data buffers from `srcBlob`&period;
| xref:BloombergLP/bdlbb/Blob/numBuffers.adoc[`numBuffers`] 
| Return the number of blob buffers held by this blob&period;
| xref:BloombergLP/bdlbb/Blob/numDataBuffers.adoc[`numDataBuffers`] 
| Return the number of blob buffers containing data in this blob&period;
| xref:BloombergLP/bdlbb/Blob/prependDataBuffer-0d.adoc[`prependDataBuffer`] 
| `prependDataBuffer` overloads
| xref:BloombergLP/bdlbb/Blob/removeAll.adoc[`removeAll`] 
| Remove all blob buffers from this blob, and set its length to 0&period;
| xref:BloombergLP/bdlbb/Blob/removeBuffer.adoc[`removeBuffer`] 
| Remove the buffer at the specified `index` from this blob&period;
| xref:BloombergLP/bdlbb/Blob/removeBuffers.adoc[`removeBuffers`] 
| Remove the specified `numBuffers` starting at the specified `index`&period;
| xref:BloombergLP/bdlbb/Blob/removeUnusedBuffers.adoc[`removeUnusedBuffers`] 
| Remove any unused capacity buffers from this blob&period;
| xref:BloombergLP/bdlbb/Blob/replaceDataBuffer.adoc[`replaceDataBuffer`] 
| Replace the data buffer at the specified `index` with `buffer`&period;
| xref:BloombergLP/bdlbb/Blob/reserveBufferCapacity.adoc[`reserveBufferCapacity`] 
| Allocate capacity to store at least the specified `numBuffers` buffers&period;
| xref:BloombergLP/bdlbb/Blob/setLength.adoc[`setLength`] 
| Set the length of this blob to the specified `length`&period;
| xref:BloombergLP/bdlbb/Blob/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with that of `other`&period;
| xref:BloombergLP/bdlbb/Blob/swapBufferRaw.adoc[`swapBufferRaw`] 
| Swap the blob buffer at the specified `index` with `srcBuffer`&period;
| xref:BloombergLP/bdlbb/Blob/totalSize.adoc[`totalSize`] 
| Return the sum of the sizes of all blob buffers in this blob (i&period;e&period;, the capacity of this blob)&period;
| xref:BloombergLP/bdlbb/Blob/trimLastDataBuffer.adoc[`trimLastDataBuffer`] 
| Trim the last data buffer down to `lastDataBufferLength()`&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlbb/operator_not_eq-0f.adoc[BloombergLP::bdlbb::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` blobs do not have the same value&period;
| `xref:BloombergLP/bdlbb/operator_eq-06.adoc[BloombergLP::bdlbb::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` blobs have the same value&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlbb/swap-04.adoc[`swap`]
| Efficiently exchange the values of the specified `a` and `b` objects&period;
|===


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