Class AudioResource
- java.lang.Object
-
- com.github.bordertech.wcomponents.InternalResource
-
- com.github.bordertech.wcomponents.AudioResource
-
- All Implemented Interfaces:
Audio
,ContentAccess
,ContentStreamAccess
,Serializable
public class AudioResource extends InternalResource implements Audio
Provides a bridge to static audio resources which are present in the class path, but not in the web application itself.- Since:
- 1.0.0
- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AudioResource(String audioResource)
Creates an AudioResource.AudioResource(String audioResource, String description)
Creates an AudioResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDuration()
Retrieves the duration of the audio clip.void
setDuration(int duration)
Sets the duration of the audio clip, A value of <= 0 indicates that the duration is unknown.-
Methods inherited from class com.github.bordertech.wcomponents.InternalResource
getBytes, getDescription, getMimeType, getResourceName, getStream, getTargetUrl, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.bordertech.wcomponents.ContentAccess
getBytes, getDescription, getMimeType
-
Methods inherited from interface com.github.bordertech.wcomponents.ContentStreamAccess
getStream
-
-
-
-
Constructor Detail
-
AudioResource
public AudioResource(String audioResource)
Creates an AudioResource.- Parameters:
audioResource
- the resource name.
-
-
Method Detail
-
getDuration
public int getDuration()
Retrieves the duration of the audio clip. A value of <= 0 indicates that the duration is unknown.- Specified by:
getDuration
in interfaceAudio
- Returns:
- the duration of the audio clip.
-
setDuration
public void setDuration(int duration)
Sets the duration of the audio clip, A value of <= 0 indicates that the duration is unknown.- Parameters:
duration
- The duration to set.
-
-