Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Cyberdog Programmer's Kit / Part 3 - Cyberdog Reference
Chapter 7 - Classes and Methods / CyberItem


CreateCyberStream

Creates a Cyberdog stream that can be used to download the data referenced by this Cyberdog item.

CyberStream CreateCyberStream ();
return value
The CyberStream object if one is created; otherwise, kODNULL.
DISCUSSION
Typically, this method is called by a Cyberdog display part that needs to download and display the content referenced by this Cyberdog item. This method may also be called by a download part, which uses the stream to download and save to disk the content referenced by a Cyberdog item. The superclass implementation returns kODNULL.

This method should initialize the Cyberdog stream with information about the location of the data. Because CreateCyberStream is synchronous, the item and the stream should be structured so that the CyberStream object is created quickly.

Typically, a Cyberdog item can return a stream if the data referenced by the Cyberdog item resides in a file. However, in some cases, a Cyberdog item might refer to a connection rather than a file. For example, a Cyberdog item might reference a Telnet connection or a mailbox on a server. In such cases, the Cyberdog item may not return a stream.

The display part should dispose of the stream object when the download operation is complete.

If you subclass CyberItem and override this method, your override must not call its inherited method; that is, your override method must implement this method's functionality completely.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996