libs-base/Documentation/gsdoc/NSMutableData.gsdoc
CaS d4d09c40aa Corrected spec for primitive methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10116 72102866-910b-0410-8b05-ffd578937521
2001-06-08 11:09:32 +00:00

186 lines
5.8 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
<gsdoc base="NSMutableData" prev="NSMutableCharacterSet" next="NSMutableDictionary" up="Base">
<head>
<title>NSMutableData</title>
<author name="Richard Frith-Macdonald">
<email address="rfm@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
</head>
<body>
<chapter>
<heading>NSMutableData</heading>
<class name="NSMutableData">
<declared>Foundation/NSData.h</declared>
<conform>NSCoding</conform>
<desc>
</desc>
<method type="id" factory="yes">
<sel>allocWithZone:</sel>
<arg type="NSZone*">zone</arg>
<desc>
</desc>
</method>
<method type="id" factory="yes">
<sel>dataWithCapacity:</sel>
<arg type="unsigned int">aNumItems</arg>
<desc>
</desc>
</method>
<method type="id" factory="yes">
<sel>dataWithLength:</sel>
<arg type="unsigned int">length</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>appendBytes:</sel>
<arg type="const void*">bytes</arg>
<sel>length:</sel>
<arg type="unsigned int">length</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>appendData:</sel>
<arg type="NSData*">otherData</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>increaseLengthBy:</sel>
<arg type="unsigned int">extraLength</arg>
<desc>
</desc>
</method>
<method type="id">
<sel>initWithCapacity:</sel>
<arg type="unsigned int">capacity</arg>
<desc>
</desc>
</method>
<method type="id">
<sel>initWithLength:</sel>
<arg type="unsigned int">length</arg>
<desc>
</desc>
</method>
<method type="void*">
<sel>mutableBytes</sel>
<desc>
<p>
Returns a pointer to the data storage of the receiver.<br />
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 <code>-length</code> method.
</p>
<p>
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.
</p>
<p>
This is a 'primitive' method ... you need to implement it
if you write a subclass of NSMutableData.
</p>
</desc>
</method>
<method type="void">
<sel>replaceBytesInRange:</sel>
<arg type="NSRange">range</arg>
<sel>withBytes:</sel>
<arg type="const void*">bytes</arg>
<desc>
<p>
Replaces the bytes of data in the specified range with a
copy of the new bytes supplied.<br />
If the location of the range specified lies beyond the end
of the data (<code>[self length] &lt; range.location</code>)
then a range exception is raised.<br />
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.<br />
</p>
</desc>
</method>
<method type="void">
<sel>resetBytesInRange:</sel>
<arg type="NSRange">range</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeAlignedBytesLength:</sel>
<arg type="unsigned int">length</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeDataAt:</sel>
<arg type="const void*">data</arg>
<sel>ofObjCType:</sel>
<arg type="const char*">type</arg>
<sel>context:</sel>
<arg type="id&lt;NSObjCTypeSerializationCallBack&gt;">callback</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeInt:</sel>
<arg type="int">value</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeInt:</sel>
<arg type="int">value</arg>
<sel>atIndex:</sel>
<arg type="unsigned int">index</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeInts:</sel>
<arg type="int*">intBuffer</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>serializeInts:</sel>
<arg type="int*">intBuffer</arg>
<sel>count:</sel>
<arg type="unsigned int">numInts</arg>
<sel>atIndex:</sel>
<arg type="unsigned int">index</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>setData:</sel>
<arg type="NSData*">aData</arg>
<desc>
</desc>
</method>
<method type="void">
<sel>setLength:</sel>
<arg type="unsigned int">length</arg>
<desc>
<p>
Sets the length of the NSMutableData object.
If the length is increased, the newly allocated data area
is filled with zero bytes.
</p>
<p>
This is a 'primitive' method ... you need to implement it
if you write a subclass of NSMutableData.
</p>
</desc>
</method>
</class>
</chapter>
</body>
</gsdoc>