[#BloombergLP-balber-BerUtil-putLength] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil.adoc[BerUtil]::putLength :relfileprefix: ../../../ :mrdocs: Encode the specified `length` to the specified `streamBuf`. Return 0 on success, and a non‐zero value otherwise. The behavior is undefined unless `0 <= length`. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int putLength( std::streambuf* streamBuf, int length); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#