The NXData classNXData represents a structure for storing binary data.
More...
#import <Foundation/Foundation.h>
|
void * | _data |
| Raw data buffer storing the binary content.
|
|
size_t | _size |
| Current size of valid data in bytes.
|
|
size_t | _cap |
| Total allocated capacity in bytes.
|
|
id | _zone |
| The memory zone where the object is allocated.
|
|
unsigned short | _retain |
| The retain count of the object.
|
|
id | _next |
| The next object in an autorelease pool.
|
|
Class | isa |
| A pointer to the object's class structure. More...
|
|
The NXData class
NXData represents a structure for storing binary data.
Definition at line 30 of file NXData.h.
◆ appendBytes:size:()
- (BOOL) appendBytes: |
|
(const void *) |
bytes |
size: |
|
(size_t) |
size |
|
|
| |
Appends raw bytes to the data.
- Parameters
-
bytes | The bytes to append. |
size | The number of bytes to append. |
- Returns
- YES if successful, NO otherwise.
◆ appendData:()
Appends another NXData instance to this data, by copying its contents.
- Parameters
-
- Returns
- YES if successful, NO otherwise.
◆ appendString:()
Appends a string to the data.
- Parameters
-
aString | The string to append. |
- Returns
- YES if successful, NO otherwise.
◆ bytes()
Returns a pointer to the raw data bytes.
- Returns
- A pointer to the raw data bytes, or NULL if the data is empty.
◆ dataWithBytes:size:()
+ (NXData *) dataWithBytes: |
|
(const void *) |
bytes |
size: |
|
(size_t) |
size |
|
|
| |
Returns a new NXData instance with a copy of bytes.
- Parameters
-
bytes | The bytes to copy. |
size | The number of bytes to copy. |
- Returns
- A new NXData instance containing a copy of the specified bytes.
This method allocates a new NXData instance and copies the contents of the specified bytes into it.
◆ dataWithCapacity:()
+ (NXData *) dataWithCapacity: |
|
(size_t) |
capacity |
|
Returns a new NXData instance with the specified capacity.
- Parameters
-
capacity | The initial capacity of the data, in bytes. |
- Returns
- A new NXData instance with the specified capacity.
This method allocates a new NXData instance with the specified capacity.
◆ dataWithString:()
Returns a new NXData instance with a copy of the specified string.
- Parameters
-
aString | The string to copy. |
- Returns
- A new NXData instance containing a copy of the specified string.
This method allocates a new NXData instance and copies the contents of the specified string into it.
◆ hashWithAlgorithm:()
Creates a new NXData instance with a hash of the data.
- Parameters
-
algorithm | The hash algorithm to use. |
- Returns
- A new NXData instance containing the hash of the data.
◆ initWithBytes:size:()
- (id) initWithBytes: |
|
(const void *) |
bytes |
size: |
|
(size_t) |
size |
|
|
| |
Initializes a new NXData instance with a copy of bytes.
- Parameters
-
bytes | The bytes to copy. |
size | The number of bytes to copy. |
- Returns
- A new NXData instance containing a copy of the specified bytes.
◆ initWithCapacity:()
- (id) initWithCapacity: |
|
(size_t) |
capacity |
|
Initializes a new NXData instance with the specified capacity.
- Parameters
-
capacity | The initial capacity of the data, in bytes. |
- Returns
- A new NXData instance with the specified capacity.
◆ initWithString:()
Initializes a new NXData instance with a copy of the specified string.
- Parameters
-
aString | The string to copy. |
- Returns
- A new NXData instance containing a copy of the specified string.
The documentation for this class was generated from the following file: