BloombergLP::balber::BerUtil_StreambufUtil::getChars

Read the specified bufferLength number of bytes from the input sequence of the specified streamBuf, as if by a call to `streamBuf->sgetn(buffer.

Synopsis

Declared in <balber_berutil.h>

static
int
getChars(
    char* buffer,
    std::streambuf* streamBuf,
    int bufferLength);

Description

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.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
bufferdestination byte buffer
streamBufinput stream buffer
bufferLengthnumber of bytes to read