Type Method

data

Creates an empty data object.

Declaration

+ (instancetype)data;

Discussion

This method is declared primarily for the use of mutable subclasses of NSData.

See Also

Creating Data

+ dataWithBytes:length:

Creates a data object containing a given number of bytes copied from a given buffer.

+ dataWithBytesNoCopy:length:

Creates a data object that holds a given number of bytes from a given buffer.

+ dataWithBytesNoCopy:length:freeWhenDone:

Creates a data object that holds a given number of bytes from a given buffer.

+ dataWithData:

Creates a data object containing the contents of another data object.

- initWithBytes:length:

Initializes a data object filled with a given number of bytes copied from a given buffer.

- initWithBytesNoCopy:length:

Initializes a data object filled with a given number of bytes of data from a given buffer.

- initWithBytesNoCopy:length:deallocator:

Initializes a data object filled with a given number of bytes of data from a given buffer, with a custom deallocator block.

- initWithBytesNoCopy:length:freeWhenDone:

Initializes a newly allocated data object by adding the given number of bytes from the given buffer.

- initWithData:

Initializes a data object with the contents of another data object.