javax.media
接口 CachingControl

所有超级接口:
Control
所有已知子接口:
ExtendedCachingControl

public interface CachingControl
extends 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.

另请参见:
Controller, ControllerListener, CachingControlEvent, Player

字段摘要
static long LENGTH_UNKNOWN
          Use to indicate that the CachingControl doesn't know how long the content is.
 
方法摘要
 long getContentLength()
          Get the total number of bytes in the media being downloaded.
 long getContentProgress()
          Get the total number of bytes of media data that have been downloaded so far.
 java.awt.Component getControlComponent()
          Get a Component that provides additional download control.
 java.awt.Component getProgressBarComponent()
          Get a Component for displaying the download progress.
 boolean isDownloading()
          Check whether or not media is being downloaded.
 

字段详细信息

LENGTH_UNKNOWN

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

另请参见:
常量字段值
方法详细信息

isDownloading

boolean isDownloading()
Check whether or not media is being downloaded.

返回:
Returns true if media is being downloaded; otherwise returns false.

getContentLength

long getContentLength()
Get the total number of bytes in the media being downloaded. Returns LENGTH_UNKNOWN if this information is not available.

返回:
The media length in bytes, or LENGTH_UNKNOWN.

getContentProgress

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

返回:
The number of bytes downloaded.

getProgressBarComponent

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

返回:
Progress bar GUI.

getControlComponent

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

指定者:
接口 Control 中的 getControlComponent
返回:
Download control GUI.