[#BloombergLP-balber-BerUtil-getLength] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil.adoc[BerUtil]::getLength :relfileprefix: ../../../ :mrdocs: Decode BER length octets from `streamBuf`. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int getLength( std::streambuf* streamBuf, int* result, int* accumNumBytesConsumed); ---- == Description If the length is indefinite (i.e., contents will be terminated by "end‐of‐content" octets) then `result` will be set to `k_INDEFINITE_LENGTH`. Add the number of bytes consumed to the specified `accumNumBytesConsumed`. Return 0 on success, and a non‐zero value otherwise. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *streamBuf* | input stream buffer | *result* | destination for the decoded length | *accumNumBytesConsumed* | running total of bytes consumed; incremented by this call |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#