Packagech.capi.net.files
Classpublic class URLStreamFile
InheritanceURLStreamFile Inheritance AbstractLoadableFile Inheritance GlobalEventDispatcher Inheritance flash.events.EventDispatcher
Implements ILoadableFile

Represents a ILoadableFile based on a URLStream object.



Public Properties
 PropertyDefined By
 InheritedbytesLoaded : uint
[read-only] Defines the bytes that have been loaded.
AbstractLoadableFile
 InheritedbytesTotal : uint
[read-only] Defines the total bytes to load.
AbstractLoadableFile
 InheritedbytesTotalRetrieved : Boolean
[read-only] Defines if the bytesTotal have been retrieved.
AbstractLoadableFile
 InheritedcloseEvent : Event
[read-only] Defines the event that happend to close the file (Event.CLOSE, Event.COMPLETE, ...).
AbstractLoadableFile
 InheriteddispatchGlobalEvents : Boolean
Defines if the global events must be dispatched or not.
GlobalEventDispatcher
 InheritedfixedRequest : URLRequest
[read-only] Defines the URLRequest that has been loaded by the ILoadableFile.
AbstractLoadableFile
 Inheritedloaded : Boolean
[read-only] Defines if the ILoadManager operation is complete.
AbstractLoadableFile
 InheritedloadManagerObject : Object
[read-only] Defines the load manager object.
AbstractLoadableFile
 InheritednetState : String
Defines the NetState value.
AbstractLoadableFile
 Inheritedproperties : IProperties
[read-only] Defines the properties stored in the ILoadableFile.
AbstractLoadableFile
 InheritedstateIdle : Boolean
[read-only] Defines if the AbstractLoadableFile is idle.
AbstractLoadableFile
 InheritedstateLoading : Boolean
[read-only] Defines if the AbstractLoadableFile is loading.
AbstractLoadableFile
 InheritedurlRequest : URLRequest
Defines the URLRequest object that specify the URL to load.
AbstractLoadableFile
 InheritedurlVariables : IMap
Defines the variables key/values to be replaced in the url before the loading is launched.
AbstractLoadableFile
 InheriteduseCache : Boolean
Defines if the ILoadManager can use the cache or not.
AbstractLoadableFile
 InheritedvirtualBytesTotal : uint
Defines the virtual total bytes.
AbstractLoadableFile
Public Methods
 MethodDefined By
  
URLStreamFile(loadObject:URLStream)
Creates a new URLStreamFile object.
URLStreamFile
 Inherited
destroy():void
Destroys this ILoadableFile.
AbstractLoadableFile
 Inherited
dispatchEvent(evt:Event):Boolean
Dispatches the specified Event through the listeners.
GlobalEventDispatcher
  
getData(asClass:String = null, appDomain:ApplicationDomain = null):*
Retrieves the data of the loadManagerObject if the loading is complete.
URLStreamFile
  
getEventDispatcher():IEventDispatcher
Retrieves the IEventDispatcher, which is directly the URLStream object.
URLStreamFile
  
getType():String
Retrieves the type of the file based on the LoadableFileType constants.
URLStreamFile
 Inherited
Invalidate the current fixedRequest.
AbstractLoadableFile
  
isClassSupported(aClass:String, appDomain:ApplicationDomain = null):Boolean
Retrieves if the specified class type is supported by this ILoadableFile or not.
URLStreamFile
 Inherited
isDestroyed():Boolean
Retrieves if this ILoadableFile has been destroyed.
AbstractLoadableFile
 Inherited
isOnline():Boolean
Retrieves if the current AbstractLoadableFile is online or not.
AbstractLoadableFile
 Inherited
Tells the ILoadableFile to update the fixedRequest value that will be used to load the file.
AbstractLoadableFile
 Inherited
start():Boolean
Set the state as loading.
AbstractLoadableFile
 Inherited
stop():void
Set the state as idle.
AbstractLoadableFile
 Inherited
toString():String
Get the URL of the AbstractLoadableFile.
AbstractLoadableFile
Protected Methods
 MethodDefined By
 Inherited
checkData():void
Checks if data has been loaded and is available to be retrieved.
AbstractLoadableFile
 Inherited
Checks if the current ILoadableFile has been destroyed and if so, throws an IllegalOperationError.
AbstractLoadableFile
 Inherited
Creates a clone of the current URLRequest and put the variables values in its data.
AbstractLoadableFile
 Inherited
getURLRequest():URLRequest
Retrieves the URLRequest that is created depending of the useCache property value.
AbstractLoadableFile
 Inherited
isInstanceOf(source:String, superClasses:Array, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of one of the specified super classes.
AbstractLoadableFile
 Inherited
isInstanceOfClass(source:String, superClass:String, appDomain:ApplicationDomain = null):Boolean
Checks if the specified source class is a child of the specified super class.
AbstractLoadableFile
 Inherited
onComplete(evt:Event):void
Event.COMPLETE listener.
AbstractLoadableFile
 Inherited
onHttpStatus(evt:HTTPStatusEvent):void
HTTPStatusEvent.HTTP_STATUS listener.
AbstractLoadableFile
 Inherited
onInit(evt:Event):void
Event.INIT listener.
AbstractLoadableFile
 Inherited
onIOError(evt:IOErrorEvent):void
IOErrorEvent listener.
AbstractLoadableFile
 Inherited
onOpen(evt:Event):void
Event.OPEN listener.
AbstractLoadableFile
 Inherited
onProgress(evt:ProgressEvent):void
ProgressEvent.PROGRESS listener.
AbstractLoadableFile
 Inherited
onSecurityError(evt:SecurityErrorEvent):void
SecurityErrorEvent listener.
AbstractLoadableFile
  
processLoading(request:URLRequest):void
Starts the loading of the URLStream.
URLStreamFile
 Inherited
registerTo(dispatcher:IEventDispatcher):void
Register the events of the AbstractLoadableFile.
AbstractLoadableFile
 Inherited
unregisterFrom(dispatcher:IEventDispatcher):void
Unregister the events of the AbstractLoadableFile.
AbstractLoadableFile
Events
 Event Summary Defined By
 InheritedDispatched when the download operation stops.AbstractLoadableFile
 InheritedDispatched after all the received data is received.AbstractLoadableFile
 InheritedDispatched after an event is dispatched.GlobalEventDispatcher
 InheritedDispatched before an event is dispatched.GlobalEventDispatcher
 InheritedDispatched when the http headers are received.AbstractLoadableFile
 InheritedDispatched when the content of the loadManagerObject is displayed.AbstractLoadableFile
 InheritedDispatched if a call to start() results in a fatal error that terminates the download.AbstractLoadableFile
 InheritedDispatched when the download operation commences following a call to the ILoadManager.load() method.AbstractLoadableFile
 InheritedDispatched when data is received as the download operation progresses.AbstractLoadableFile
 InheritedDispatched if a call to start() attempts to load data from a server outside the security sandbox.AbstractLoadableFile
 InheritedDispatched when the load couldn't start.AbstractLoadableFile
Public Constants
 ConstantDefined By
 InheritedNO_CACHE_VARIABLE_NAME : String = noCache
[static] Name of the 'no cache' variable.
AbstractLoadableFile
Constructor Detail
URLStreamFile()Constructor
public function URLStreamFile(loadObject:URLStream)

Creates a new URLStreamFile object.

Parameters
loadObject:URLStream — The URLStream object.
Method Detail
getData()method
public function getData(asClass:String = null, appDomain:ApplicationDomain = null):*

Retrieves the data of the loadManagerObject if the loading is complete. Actually, the only class supported is DataType.STREAM.

Parameters

asClass:String (default = null) — The class instance that should be returned by the method.
 
appDomain:ApplicationDomain (default = null) — The ApplicationDomain to retrieve the class. If null is specified, then the current domain will be used.

Returns
* — The data of the loadManagerObject.

Throws
ArgumentError If — the class type is not supported.
 
ch.capi.errors:DataError If — the data are not loaded.

See also

getEventDispatcher()method 
public function getEventDispatcher():IEventDispatcher

Retrieves the IEventDispatcher, which is directly the URLStream object.

Returns
IEventDispatcher — The URLStream object.
getType()method 
public function getType():String

Retrieves the type of the file based on the LoadableFileType constants.

Returns
String — The ILoadableFile type.
isClassSupported()method 
public function isClassSupported(aClass:String, appDomain:ApplicationDomain = null):Boolean

Retrieves if the specified class type is supported by this ILoadableFile or not.

Parameters

aClass:String — The class type to check.
 
appDomain:ApplicationDomain (default = null) — The ApplicationDomain to retrieve the class. If null is specified, then the current domain will be used.

Returns
Booleantrue if the type is supported.
processLoading()method 
override protected function processLoading(request:URLRequest):void

Starts the loading of the URLStream.

Parameters

request:URLRequest