List of all members.
Detailed Description
A class for storing arbitrary data in an array.
If you plan to store large hunks of data, you should consider using OFBigDataArray, which allocates the memory in pages rather than in bytes.
Member Function Documentation
- (void) addItem: |
|
(const void*) |
item |
|
|
Adds an item to the OFDataArray.
- Parameters:
-
| item | A pointer to an arbitrary item |
- (void) addItem: |
|
(const void*) |
item |
atIndex: |
|
(size_t) |
index | |
|
|
| | |
Adds an item to the OFDataArray at the specified index.
- Parameters:
-
| item | A pointer to an arbitrary item |
| index | The index where the item should be added |
- (void) addNItems: |
|
(size_t) |
nitems |
fromCArray: |
|
(const void*) |
carray | |
|
|
| | |
Adds items from a C array to the OFDataArray.
- Parameters:
-
| nitems | The number of items to add |
| carray | A C array containing the items to add |
- (void) addNItems: |
|
(size_t) |
nitems |
fromCArray: |
|
(const void*) |
carray |
atIndex: |
|
(size_t) |
index | |
|
|
| | |
Adds items from a C array to the OFDataArray at the specified index.
- Parameters:
-
| nitems | The number of items to add |
| carray | A C array containing the items to add |
| index | The index where the items should be added |
+ (id) dataArrayWithBase64EncodedString: |
|
(OFString*) |
str |
|
|
Creates a new OFDataArray with an item size of 1, containing the data of the Base64-encoded string.
- Parameters:
-
| str | The string with the Base64-encoded data |
- Returns:
- A new autoreleased OFDataArray
+ (id) dataArrayWithContentsOfFile: |
|
(OFString*) |
path |
|
|
Creates a new OFDataArary with an item size of 1, containing the data of the specified file.
- Parameters:
-
| path | The path of the file |
- Returns:
- A new autoreleased OFDataArray
+ (id) dataArrayWithItemSize: |
|
(size_t) |
is |
|
|
Creates a new OFDataArray whose items all have the same size.
- Parameters:
-
- Returns:
- A new autoreleased OFDataArray
- (id) initWithBase64EncodedString: |
|
(OFString*) |
str |
|
|
Initializes an already allocated OFDataArray with an item size of 1, containing the data of the Base64-encoded string.
- Parameters:
-
| str | The string with the Base64-encoded data |
- Returns:
- A initialized OFDataArray
- (id) initWithContentsOfFile: |
|
(OFString*) |
path |
|
|
Initializes an already allocated OFDataArray with an item size of 1, containing the data of the specified file.
- Parameters:
-
| path | The path of the file |
- Returns:
- An initialized OFDataArray
- (id) initWithItemSize: |
|
(size_t) |
is |
|
|
Initializes an already allocated OFDataArray whose items all have the same size.
- Parameters:
-
- Returns:
- An initialized OFDataArray
- (void *) itemAtIndex: |
|
(size_t) |
index |
|
|
Returns a specific item of the OFDataArray.
- Parameters:
-
| index | The number of the item to return |
- Returns:
- The specified item of the OFDataArray
- Returns:
- The size of each item in the OFDataArray in bytes
- Returns:
- The MD5 hash of the data array as an autoreleased OFString
- (void) removeItemAtIndex: |
|
(size_t) |
index |
|
|
Removes the item at the specified index.
- Parameters:
-
| index | The index of the item to remove |
- (void) removeNItems: |
|
(size_t) |
nitems |
|
|
Removes the specified amount of items from the end of the OFDataArray.
- Parameters:
-
| nitems | The number of items to remove |
- (void) removeNItems: |
|
(size_t) |
nitems |
atIndex: |
|
(size_t) |
index | |
|
|
| | |
Removes the specified amount of items at the specified index.
- Parameters:
-
| nitems | The number of items to remove |
| index | The index at which the items are removed |
- Returns:
- The SHA1 hash of the data array as an autoreleased OFString
- Returns:
- A string containing the data in Base64 encoding
The documentation for this class was generated from the following files: