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

`BlobBuffer` is a simple in&hyphen;core representation of a shared buffer&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;

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlbb/BlobBuffer/2constructor-0df.adoc[`BlobBuffer`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlbb/BlobBuffer/2destructor.adoc[`&#126;BlobBuffer`] [.small]#[destructor]#
| Destroy this blob buffer&period;
| xref:BloombergLP/bdlbb/BlobBuffer/operator_assign-0d.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdlbb/BlobBuffer/buffer-05.adoc[`buffer`] 
| `buffer` overloads
| xref:BloombergLP/bdlbb/BlobBuffer/data.adoc[`data`] 
| Return the address of the modifiable buffer represented by this object&period;
| xref:BloombergLP/bdlbb/BlobBuffer/print.adoc[`print`] 
| Format this object as a hexadecimal dump on the specified `stream`, and return a reference to the modifiable `stream`&period; Note that the optionally specified `level` and `spacesPerLevel` arguments are specified for interface compatibility only and are effectively ignored&period;
| xref:BloombergLP/bdlbb/BlobBuffer/reset-0d.adoc[`reset`] 
| `reset` overloads
| xref:BloombergLP/bdlbb/BlobBuffer/setSize.adoc[`setSize`] 
| Set the size of this blob buffer to the specified `size`&period; The behavior is undefined unless `0 &lt;&equals; size` and the capacity of the buffer returned by the `buffer` method is at least `size` bytes&period;
| xref:BloombergLP/bdlbb/BlobBuffer/size.adoc[`size`] 
| Return the size of the buffer represented by this object&period;
| xref:BloombergLP/bdlbb/BlobBuffer/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with the value of the specified `other` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee&period;
| xref:BloombergLP/bdlbb/BlobBuffer/trim.adoc[`trim`] 
| Reduce this buffer to the specified `toSize` and return the leftover&period; The behaviour is undefined unless &apos;0 &lt;&equals; toSize &amp;&amp; toSize &lt;&equals; size()&apos;&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlbb/operator_not_eq-0d.adoc[BloombergLP::bdlbb::operator!&equals;]`
| Return `true` if the specified `lhs` and `rhs` blob buffers do not have the same value, and `false` otherwise&period; Two blob buffers do not have the same value if they do not represent the same buffer of the same size&period;
| `xref:BloombergLP/bdlbb/operator_eq-03.adoc[BloombergLP::bdlbb::operator&equals;&equals;]`
| Return `true` if the specified `lhs` and `rhs` blob buffers have the same value, and `false` otherwise&period; Two blob buffers have the same value if they represent the same buffer of the same size&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlbb/swap-0d.adoc[`swap`]
| Efficiently exchange the values of the specified `a` and `b` objects&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee&period;
|===


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