O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSUnarchiver — Mac OS X 10.0

Synopsis

This concrete subclass of NSCoder is used to convert archived data (such as the data produced by NSArchiver) into an object tree, which is restored to the state it was in prior to archiving.

image with no caption

@interface NSUnarchiver : NSCoder
                                  // Initializers
   - (id)initForReadingWithData:(NSData *)data;
                                  // Accessor Methods
   - (void)setObjectZone:(NSZone *)zone;
   - (NSZone *)objectZone;
                                  // Class Methods
   + (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
   + (void)decodeClassName:(NSString *)inArchiveName 
                                 asClassName:(NSString *)trueName;
   + (id)unarchiveObjectWithData:(NSData *)data;
   + (id)unarchiveObjectWithFile:(NSString *)path;
                                  // Instance Methods
   - (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName;
   - (void)decodeClassName:(NSString *)inArchiveName 
                                 asClassName:(NSString *)trueName;
   - (BOOL)isAtEnd;
   - (void)replaceObject:(id)object 
                                 withObject:(id)newObject;
   - (unsigned)systemVersion;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required