NSURLHandle

NSURLHandle Mac OS X 10.0

NSURLHandle provides an interface for uploading and downloading data to and from a resource specified by an NSURL. NSURLHandle actually offloads much of this work to subclasses that implement NSURLHandle's interface to work with various schemes.

figs/cocn_13116.gif

@interface NSURLHandle : NSObject
 // Class Methods
   + (Class)URLHandleClassForURL:(NSURL *)anURL;
   + (NSURLHandle *)cachedHandleForURL:(NSURL *)anURL;
   + (BOOL)canInitWithURL:(NSURL *)anURL;
   + (void)registerURLHandleClass:(Class)anURLHandleSubclass;
 // Instance Methods
   - (void)addClient:(id <NSURLHandleClient>)client;
   - (id) initWithURL:(NSURL *)anURL cached:(BOOL)willCache;
   - (NSData *)availableResourceData;
   - (void)backgroundLoadDidFailWithReason:(NSString *)reason;
   - (void)beginLoadInBackground;
   - (void)cancelLoadInBackground;
   - (void)didLoadBytes:(NSData *)newBytes loadComplete:(BOOL)yorn;
   - (void)endLoadInBackground;
   - (NSString *)failureReason;
   - (void)flushCachedData;
   - (void)loadInBackground;
   - (NSData *)loadInForeground;
   - (id)propertyForKey:(NSString *)propertyKey;
   - (id)propertyForKeyIfAvailable:(NSString *)propertyKey;
   - (void)removeClient:(id <NSURLHandleClient>)client;
   - (NSData *)resourceData;
   - (NSURLHandleStatus)status;
   - (BOOL)writeData:(NSData *)data;
   - (BOOL)writeProperty:(id)propertyValue forKey:(NSString *)propertyKey;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes