getCapacity
Returns the total number of bytes the OSData can store without reallocating.
Declaration
virtual unsigned int getCapacity() const;Return Value
The total number bytes the OSData can store without reallocating.
Overview
OSData objects grow when full to accommodate additional bytes. See getCapacityIncrement and ensureCapacity.
OSData objects created or initialized to use a shared buffer do not make use of this attribute, and return -1 from this function.
See Also
Miscellaneous
appendByteappendBytes(const OSData *)appendBytes(const void *, unsigned int)ensureCapacityfreegetBytesNoCopy()getBytesNoCopy(unsigned int, unsigned int)getCapacityIncrementgetLengthinitWithBytesinitWithBytesNoCopyinitWithCapacityinitWithData(const OSData *)initWithData(const OSData *, unsigned int, unsigned int)isEqualTo(const OSData *)isEqualTo(const OSMetaClassBase *)isEqualTo(const OSString *)isEqualTo(const void *, unsigned int)serializesetCapacityIncrementwithByteswithBytesNoCopywithCapacitywithData(const OSData *)withData(const OSData *, unsigned int, unsigned int)