Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

WebResource Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/WebKit.framework
Availability
Available in Mac OS X v10.3.9 and later.
Companion guide
Declared in
WebResource.h

Overview

A WebResource object represents a downloaded URL. It encapsulates the data of the download as well as other resource properties such as the URL, MIME type and frame name.

Use the initWithData:URL:MIMEType:textEncodingName:frameName: method to initialize a newly created WebResource object. Use the other methods in this class to get the properties of a WebResource object.

Tasks

Initializing

Getting Attributes

Instance Methods

data

Returns the receiver’s data.

- (NSData *)data

Availability
Declared In
WebResource.h

frameName

Returns the receiver’s frame name.

- (NSString *)frameName

Discussion

If the receiver does not represent the contents of an entire HTML frame, this method returns nil.

Availability
Declared In
WebResource.h

initWithData:URL:MIMEType:textEncodingName:frameName:

Initializes and returns a web resource instance.

- (id)initWithData:(NSData *)data URL:(NSURL *)URL MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)textEncodingName frameName:(NSString *)frameName

Discussion

The textEncodingName argument may be nil. Use the frameName argument if the resource represents the contents of an entire HTML frame, otherwise pass nil.

Availability
Declared In
WebResource.h

MIMEType

Returns the receiver’s MIME type.

- (NSString *)MIMEType

Availability
Declared In
WebResource.h

textEncodingName

Returns the receiver’s text encoding name if it exists, nil otherwise.

- (NSString *)textEncodingName

Availability
Declared In
WebResource.h

URL

Returns the receiver’s URL.

- (NSURL *)URL

Availability
Declared In
WebResource.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice