BloombergLP::balber::BerUtil_IntegerImpUtil::put40BitIntegerValue

Write the 5 octets that comprise the 40-bit, signed, 2's-complement, bit-endian representation of the specified integer value to the specified streamBuf.

Synopsis

Declared in <balber_berutil.h>

static
int
put40BitIntegerValue(
    std::streambuf* streamBuf,
    bsls::Types::Int64 value);

Description

Return 0 if successful, and a non-zero value otherwise. The operation succeeds if all bytes corresponding to the representation of the value are written to the streamBuf without the write position becoming unavailable. The behavior is undefined unless the value is in the half-open interval [-549755813888, 549755813888)].

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streamBufoutput stream buffer
valuevalue to encode