Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights Reserved.


Inherits From: NSCoder : NSObject

Conforms To: NSObject (NSObject)

Declared In: Foundation/NSArchiver.h

Class Description

NSUnarchiver, a concrete subclass of NSCoder, defines objects that can decode a data structure, such as a graph of Objective C objects, from an archive. Such archives are produced by objects of the NSArchiver class. See the NSArchiver specification for an introduction to archiving.

General Exception Conditions

While unarchiving, NSUnarchiver performs a variety of consistency checks on the incoming data stream. NSUnarchiver raises an NSInconsistentArchiveException for a variety of reasons. Possible data errors leading to this exception are: unknown type descriptors in the data file; an array type descriptor is incorrectly terminated (missing ]); excess characters in a type descriptor; a null class found where a concrete class was expected; class not loaded.

Initializing an NSUnarchiver

- (id)initForReadingWithData:(NSData *)data Initializes an NSUnarchiver object from data object data. Raises NSInvalidArgumentException if the data argument is nil.

Decoding Objects

Managing an NSUnarchiver

Substituting One Class for Another