QUICK NAVIGATOR
PRODUCTS
TECHNOLOGIES
DEVELOPMENT TOOLS
* News
* Java Media Framework
* Intel Animation for Java
* Intel Spatial Audio for Java
* Runtime Software License
* SDK Software License
* System Requirements
* Download Area
* Documentation Online
* Gallery
* General FAQ
* Support Information

[INTEL NAVIGATION HEADER]

Java* Media Framework Tutorial - Lesson 3A

Download Status

This applet has a progress bar that displays how much of the media file has downloaded. If you are viewing the AVI file locally, you won't see the progress bar. It is shown in Figure 1.

Fig. 1 Download Progress Bar

To make this applet, we used JMF’s CachingControl interface. Calling getProgressBarComponent() on a CachingControl object returns an AWT component containing a progress bar like the one above.

getContentLength(), another method of the CachingControl interface, returns the total size in bytes of the URL currently being downloaded.

A CachingControlEvent is sent to indicate each change in the value returned by getContentProgress(). The CachingControlEvent object has the following methods:

getCachingControl()

Returns the CachingControl object for which the CachingControlEvent is being delivered.

getContentProgress()

Returns the number of bytes already read during the current URL download.

CachingControlEvent is a subclass of ControllerEvent and is handled by controllerUpdate(), like all other Controller events.

Previous Lesson Tutorial Contents Next Lesson

View Source

 

This page was last updated on Feb 11th, 1997.

Legal Stuff

Free Web Hosting