[#BloombergLP-bdlsb-FixedMemInput-pubsetbuf]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::xref:BloombergLP/bdlsb/FixedMemInput.adoc[FixedMemInput]::pubsetbuf
:relfileprefix: ../../../
:mrdocs:

Reinitialize this stream buffer to use the specified character buffer&period;

== Synopsis

Declared in `&lt;bdlsb&lowbar;fixedmeminput&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlsb/FixedMemInput.adoc[FixedMemInput]*
pubsetbuf(
    char const* buffer,
    std::streamsize length);
----

== Description

Reinitialize this stream buffer to use the specified character `buffer` having the specified `length`&period; Return a pointer providing modifiable access to this stream buffer&period; The behaviour is undefined unless `buffer !&equals; 0 &amp;&amp; length &gt; 0` or `length &equals;&equals; 0`&period; Upon reinitialization for use of the new buffer, the position indicator is set to the beginning of the `buffer`&period; Note that `buffer` is held but not owned&period;

== Return Value

pointer providing modifiable access to this stream buffer

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| character buffer to read from (held, not owned)
| *length*
| size of `buffer` in bytes
|===


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