OSData
OSData wraps an array of bytes in a C++ object for use in Libkern collections.
Declaration
class OSData : OSObjectOverview
OSData represents an array of bytes as a Libkern C++ object. OSData objects are mutable: You can add bytes to them and overwrite portions of the byte array.
Use Restrictions
With very few exceptions in the I/O Kit, all Libkern-based C++ classes, functions, and macros are unsafe to use in a primary interrupt context. Consult the I/O Kit documentation related to primary interrupts for more information.
OSData provides no concurrency protection; it's up to the usage context to provide any protection necessary. Some portions of the I/O Kit, such as IORegistryEntry, handle synchronization via defined member functions for setting properties.
Topics
Miscellaneous
appendByteappendBytes(const OSData *)appendBytes(const void *, unsigned int)ensureCapacityfreegetBytesNoCopy()getBytesNoCopy(unsigned int, unsigned int)getCapacitygetCapacityIncrementgetLengthinitWithBytesinitWithBytesNoCopyinitWithCapacityinitWithData(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)
Instance Methods
appendByteappendBytesappendBytesensureCapacityfreegetBytesNoCopygetBytesNoCopygetCapacitygetCapacityIncrementgetLengthgetMetaClassinitWithBytesinitWithBytesNoCopyinitWithCapacityinitWithDatainitWithDataisEqualToisEqualToisEqualToisEqualToisSerializableserializesetCapacityIncrementsetDeallocFunctionsetSerializable