[#BloombergLP-balber-BerUtil_StreambufUtil-getChars] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil_StreambufUtil.adoc[BerUtil_StreambufUtil]::getChars :relfileprefix: ../../../ :mrdocs: Read the specified `bufferLength` number of bytes from the input sequence of the specified `streamBuf`, as if by a call to `streamBuf‐>sgetn(buffer, bufferLength)`, and load the bytes into successive elements of the specified `buffer`, starting at the first element. Return 0 on success, and a non‐zero value otherwise. The operation succeeds if `length` bytes are successfully read from the input sequence of the `streamBuf` without the read position becoming unavailable. If less than `bufferLength` bytes are read, the number of bytes loaded into `buffer` is not specified. The behavior is undefined unless `0 <= bufferLength` and `buffer` is the address of a sequence of at least `bufferLength` bytes. == Synopsis Declared in `<balber_berutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int getChars( char* buffer, std::streambuf* streamBuf, int bufferLength); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#