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

Obtain contiguous storage for at least the specified `addLength` bytes in the specified `blob` at position `blob&hyphen;&gt;length()`, and then grow `blob&hyphen;&gt;length()` by `addLength`&period; If, upon entry, such storage does not exist in `blob`, first trim the final data buffer, if any, and insert a new buffer obtained from the specified `factory`&period; Return a pointer to the beginning of the storage obtained&period; The behavior of this function is undefined unless `0 &lt; addLength`, and `factory&hyphen;&gt;allocate()`, if called, yields a block of memory of a size at least as large as `addLength`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char*
getContiguousDataBuffer(
    xref:BloombergLP/bdlbb/Blob.adoc[Blob]* blob,
    int addLength,
    xref:BloombergLP/bdlbb/BlobBufferFactory.adoc[BlobBufferFactory]* factory);
----


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