FileDocCategorySizeDatePackage
CachingControl.javaAPI DocJMF 2.1.1e2158Mon May 12 12:20:36 BST 2003javax.media

CachingControl

public interface CachingControl implements Control
CachingControl is an interface supported by Players that are capable of reporting download progress. Typically, this control is accessed through the Controller.getControls method. A Controller that supports this control will post CachingControlEvents often enough to support the implementation of custom progress GUIs.
see
Controller
see
ControllerListener
see
CachingControlEvent
see
Player
version
1.2, 98/10/30.

Fields Summary
public static final long
LENGTH_UNKNOWN
Use to indicate that the CachingControl doesn't know how long the content is.

The definition is: LENGTH_UNKNOWN == Long.MAX_VALUE

Constructors Summary
Methods Summary
public longgetContentLength()
Get the total number of bytes in the media being downloaded. Returns LENGTH_UNKNOWN if this information is not available.

return
The media length in bytes, or LENGTH_UNKNOWN.

public longgetContentProgress()
Get the total number of bytes of media data that have been downloaded so far.

return
The number of bytes downloaded.

public java.awt.ComponentgetControlComponent()
Get a Component that provides additional download control. Returns null if only a progress bar is provided.

return
Download control GUI.

public java.awt.ComponentgetProgressBarComponent()
Get a Component for displaying the download progress.

return
Progress bar GUI.

public booleanisDownloading()
Check whether or not media is being downloaded.

return
Returns true if media is being downloaded; otherwise returns false.