This is NSSerializer.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 NSSerializer pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject fs20 fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSObject (NSObject) fs20 fs28 s7 f0 b fs24 Declared In:tab b0 fs28 f1 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 NSSerializer class provides a mechanism for creating an abstract representation of a property list. (In OpenStep, property lists are defined to be'd0and to contain'd0objects of these classes: NSDictionary, NSArray, NSString, NSData). The NSSerializer class stores this representation in an NSData object in an architecture-independent format, so that property lists can be used with distributed applications. NSSerializer'27s companion class NSDeserializer declares methods that take the abstract representation and recreate the property list in memory. fs16 fs28 In contrast to archiving (see the NSArchiver class specification), the serialization process preserves only structural information, not class information. Thus, if a property list is serialized and then deserialized, the objects in the resulting property list might not be of the same class as the objects in the original property list. However, the structure and interrelationships of the data in the resulting property list are identical to that in the original, with one possible exception. fs16 fs28 The exception is that when an object graph is serialized, the mutability of the containers objects (NSDictionary and NSArray objects) is preserved only down to the highest node in the graph that has an immutable container. Thus, if an NSArray contains an NSMutableDictionary, the serialized version of this object graph would not preserve the mutability of the dictionary or any of the mutable objects it contained. Since serialization doesn'27t preserve class information or'd0in some cases'd0mutability, coding (as implemented by NSCoder and NSArchiver) is the preferred way to make object graphs persistent. fs16 fs28 The NSSerializer class object provides the interface to the serialization process; you don'27t create instances of NSSerializer. You might subclass NSSerializer to modify the representation it creates, for example, to encrypt the data or add authentication information. fs16 fs28 Other types of data besides property lists can be serialized using methods declared by the NSData and NSMutableData classes (see b serializeDataAt:ofObjCType:context:b0 and b deserializeDataAt:ofObjCType:atCursor:context:b0 ), allowing these types to be represented in an architecture-independent format. Furthermore, the NSObjCTypeSerializationCallBack protocol allows you to serialize and deserialize objects that aren'27t property lists. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Serialization of Property Lists fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 + (NSData *)b serializePropertyList:b0 (id)i aPropertyList s9 li7030 fi-6553 fi-5796 i0 tab Creates a data object, serializes i aPropertyListi0 into it, and returns the data object. i aPropertyListi0 must be a kind of NSData, NSString, NSArray, or NSDictionary. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 + (void)b serializePropertyList:b0 (id)i aPropertyListi0 tab Serializes the property list i aPropertyListi0 in the mutable s9 li7030 fi-6553 fi-5796 b intoData:b0 (NSMutableData *)i mdatai0 tab i tab i0 data objecti mdatai0 . i aPropertyListi0 must be a kind of NSData, NSString, NSArray, or NSDictionary. }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.