-length
method.
+ Returns a pointer to the data storage of the receiver.
+ Modifications to the memory pointed to by this pointer will
+ change the contents of the object. It is important that
+ your code should not try to modify the memory beyond the
+ number of bytes given by the -length
method.
+
+ NB. if the object is released, or any method that changes its + size or content is called, then the pointer previously returned + by this method may cease to be valid. +
++ This is a 'primitive' method ... you need to implement it + if you write a subclass of NSMutableData. +
[self length] < range.location
)
- then a range exception is raised.
+ Replaces the bytes of data in the specified range with a
+ copy of the new bytes supplied.
+ If the location of the range specified lies beyond the end
+ of the data ([self length] < range.location
)
+ then a range exception is raised.
+ Otherwise, if the range specified extends beyond the end
+ of the data, then the size of the data is increased to
+ accomodate the new bytes.
+
+ Sets the length of the NSMutableData object. + If the length is increased, the newly allocated data area + is filled with zero bytes. +
++ This is a 'primitive' method ... you need to implement it + if you write a subclass of NSMutableData. +