Function

CFDataReplaceBytes

Replaces those bytes in a CFMutableData object that fall within a specified range with other bytes.

Declaration

void CFDataReplaceBytes(CFMutableDataRef theData, CFRange range, const UInt8 *newBytes, CFIndex newLength);

Parameters

theData

A CFMutableData object. If you pass an immutable CFData object, the behavior is not defined.

range

The range of bytes (that is, the starting byte and the number of bytes from that point) to delete from theData's byte buffer.

newBytes

A pointer to the buffer containing the replacement bytes.

newLength

The number of bytes in the byte buffer newBytes.

See Also

Modifying a Mutable Data Object

CFDataAppendBytes

Appends the bytes from a byte buffer to the contents of a CFData object.

CFDataDeleteBytes

Deletes the bytes in a CFMutableData object within a specified range.

CFDataIncreaseLength

Increases the length of a CFMutableData object's internal byte buffer, zero-filling the extension to the buffer.

CFDataSetLength

Resets the length of a CFMutableData object's internal byte buffer.