[#BloombergLP-balber-BerUtil-putValue]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil.adoc[BerUtil]::putValue
:relfileprefix: ../../../
:mrdocs:

Encode the specified `value` to the specified `streamBuf`&period;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename TYPE&gt;
static
int
putValue(
    std::streambuf* streamBuf,
    TYPE const& value,
    xref:BloombergLP/balber/BerEncoderOptions.adoc[BerEncoderOptions] const* options = 0);
----

== Description

Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that the value consists of the length and contents primitives&period; Also note that only fundamental C&plus;&plus; types, `bsl&colon;&colon;string`, `bsl&colon;&colon;string&lowbar;view`, `bslstl&colon;&colon;StringRef`, and BDE date&sol;time types are supported&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *streamBuf*
| output stream buffer
| *value*
| value to encode
| *options*
| encoder options (0 for defaults)
|===


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