Contents

initWithData(const OSData *, unsigned int, unsigned int)

Initializes an instance of OSData with contents copied from a range within another OSData object.

Declaration

virtual bool initWithData( 
 const OSData *inData, 
 unsigned intstart, 
 unsigned intnumBytes);

Parameters

  • inData:

    An OSData object that provides the initial data.

  • start:

    The starting index from which bytes will be copied.

  • numBytes:

    The number of bytes to be copied from start.

Return Value

Returns true on success, false on failure.

Overview

Not for general use. Use the static instance creation method withData(OSData *, unsigned int, unsigned int) instead.

The new OSData object will grow as needed to accommodate more bytes (unlikeCFMutableData, for which a nonzero initial capacity is a hard limit).

See Also

Miscellaneous