ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/FoundationKit/Classes/NSMutableData.rtf

This is NSMutableData.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSMutableData 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSData : NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying, NSMutableCopying (NSData)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 Foundation/NSData.h 
fi0 Foundation/NSSerialization.h
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 The NSMutableData class declares the programmatic interface to objects that contain modifiable data in the form of bytes. This class inherits all read-only access methods from its superclass, NSData, and declares only those methods that permit the modification of the data.
fs16 
fs28 NSMutableData'27s two primitive methods'd0b mutableBytesb0  and b setLength:b0 'd0provide the basis for all the other methods in its interface. The b mutableBytesb0  method returns a pointer for writing into the bytes contained in the mutable data object. b setLength: b0 allows you to truncate or extend the length of a mutable data object. 
fs16 
fs28 The b appendBytes:length:b0  and b appendData:b0  methods let you append bytes or the contents of another data object to a mutable data object. You can replace a range of bytes in a mutable data object with either zeroes (using the b resetBytesInRange:b0  method), or with different bytes (using the b replaceBytesInRange:withBytes:b0  method). 
fs16 
fs28 This class declares various serialization methods that enable architecture-independent serialization of arbitrary Objective C types.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Creating an NSMutableData Object
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (id)b allocWithZone:b0 (NSZone *)i zonei0 tab Creates and returns an uninitialized mutable data object from i zonei0 .
fi-6552 fs16 
fs28 fi-6552 + (id)b dataWithCapacity:b0 (unsigned int)i numBytesi0 tab Creates and returns a mutable data object, initially allocating enough memory to hold i numBytesi0  bytes.
fi-6552 fs16 
fs28 fi-6552 + (id)b dataWithLength:b0 (unsigned int)i lengthi0 tab Creates and returns a mutable data object, giving it enough memory to hold i lengthi0  bytes.b  b0 Fills the object with zeroes up to i lengthi0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b initWithCapacity:b0 (unsigned int)i capacityi0 tab Initializes a newly allocated mutable data object, giving it enough memory to hold i capacityi0  bytes. Sets the length of the data object to 0.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b initWithLength:b0 (unsigned int)i lengthi0 tab Initializes a newly allocated mutable data object, giving it enough memory to hold i lengthi0  bytes. Fills the object with zeroes up to i lengthi0 .
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Adjusting Capacity
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b increaseLengthBy:b0 (unsigned int)i extraLengthi0 tab Increases the length of a mutable data object by i extraLengthi0  zero-filled bytes.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void *)b mutableBytesb0 tab Returns a pointer to the bytes in a mutable data object, enabling you to modify the bytes.fs28  
fi-6552 fs28 fs16 
fs28 fi-6552 {f3 -} (void)b setLength:b0 (unsigned int)i lengthi0 tab Extends or truncates the length of a mutable data object by i lengthi0  bytes. If the mutable data object is extended, the additional bytes are zero-filled.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Appending Data
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b appendBytes:b0 (const void *)i bytesi0 tab Appends i length i0 bytes to a mutable data object from
s9 li7030 fi-6553 fi-5796 b length:b0 (unsigned int)i lengthi0 tab  tab the buffer i bytesi0 .
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b appendData:b0 (NSData *)i otheri0 tab Appends the contents of the data object i otheri0  to the receiver.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Modifying Data
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b replaceBytesInRange:b0 (NSRange)i aRangei0 tab Replaces the receiver'27s bytes located in i aRangei0  with i bytesi0 . 
s9 li7030 fi-6553 fi-5796 b withBytes:b0 (const void *)i bytesi0 tab  tab Raises an NSRangeException if i aRangei0  is not within the range of the receiver's data.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b resetBytesInRange:b0 (NSRange)i aRangei0 tab Replaces the receiver'27s bytes located in i aRangei0  with zeros. Raises an NSRangeException if i aRangei0  is not within the range of the receiver's data.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Serializing Data
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b serializeAlignedBytesLength:b0 (unsigned int)i length
s9 li7030 fi-6553 fi-5796 i0 tab Prepares bytes for an b appendBytes:length:b0  invocation by serializing them. If the i lengthi0  of the bytes will cause extension past the page size, this method encodes header information, creating a hole so that all bytes in the data object are aligned on page boundaries.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b serializeDataAt:b0 (const void *)i datai0 tab Serializes whatever data element is referenced by i datai0 ,
s9 li7030 fi-6553 fi-5796 b ofObjCType:b0 (const char *)i typei0 tab tab interpreting it by the Objective C type specifier i typei0 .
b context:tab tab b0 If the data element is an object other than an instance of
(id <NSObjCTypeSerializationCallBack>)i callbacki0 tab tab  NSDictionary, NSArray, NSString, or NSData, further definition of the object can occur through a callback from object i callbacki0 . All Objective C types are currently supported except b unions b0 andb  void *. b0 Pointers refer to a single item.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b serializeInt:b0 (int)i valuei0 tab Serializes the integer i valuei0  by encoding it as a character representation.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b serializeInt:b0 (int)i valuei0 tab Serializes the integer i valuei0  by encoding it as a character 
s9 li7030 fi-6553 fi-5796 b atIndex:b0 (unsigned int)i indexi0 tab tab representation and replaces the encoded value at the specified i indexi0  in the data.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b serializeInts:b0 (int *)i intBufferi0 tab Serializes i numIntsi0  count of integers in i intBufferi0  by 
s9 li7030 fi-6553 fi-5796 b count:b0 (unsigned int)i numIntsi0 tab tab encoding each integer as a character representation.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b serializeInts:b0 (int *)i intBufferi0 tab Serializes i numIntsi0  count of integers in i intBufferi0  by
s9 li7030 fi-6553 fi-5796 b count:b0 (unsigned int)i numIntsi0 tab tab encoding each integer, starting at the specified
b atIndex:b0 (unsigned int)i indexi0 tab tab i indexi0 , and replacing each corresponding integer encoding serially.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.