BloombergLP::bdls::FdStreamBuf_FileHandler::read

Read numBytes from the file descriptor into buffer.

Synopsis

Declared in <bdls_fdstreambuf.h>

int
read(
    char* buffer,
    int numBytes);

Description

Read the specified numBytes bytes from the current position of the file descriptor into the specified buffer. Return the number of characters successfully read. The behavior is undefined unless 0 <= numBytes and buffer is at least numBytes long. Note that on Windows in text mode, `\r ` is read as a single character and stored in the buffer as ` `.

Return Value

the number of characters successfully read

Parameters

NameDescription
bufferdestination for bytes read
numBytesnumber of bytes to read