Lizzy v1.1.1

christophedelory.playlist.asx
Class Duration

java.lang.Object
  extended by christophedelory.playlist.asx.Child
      extended by christophedelory.playlist.asx.Duration
Direct Known Subclasses:
PreviewDuration

public class Duration
extends Child

Defines the length of time the stream must be rendered. This element can appear either within a REF element or within an ENTRY element. However, a DURATION element defined within a REF element overrides one that appears within the REF element's parent ENTRY element.
The DURATION element overrides a PREVIEWDURATION element.
If the value exceeds the length of the content stream, the stream terminates at its normal end-point. The default value is the entire length of the content stream or media. If the entry is a graphic file, a duration value must be specified.
Windows Media Player version 7.0 or later.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Duration()
           
 
Method Summary
 long getValue()
          Returns the duration value in milliseconds.
 String getValueString()
          Returns the duration value as a string in hours, minutes, seconds, and hundredths of a second.
 void setValue(long millis)
          Initializes the duration value in milliseconds.
 void setValueString(String value)
          Initializes the duration value as a string.
 
Methods inherited from class christophedelory.playlist.asx.Child
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Duration

public Duration()
Method Detail

getValueString

public String getValueString()
Returns the duration value as a string in hours, minutes, seconds, and hundredths of a second. Format: "hh:mm:ss.fract".

Returns:
a duration value. Shall not be null.
See Also:
setValueString(java.lang.String), getValue()

setValueString

public void setValueString(String value)
Initializes the duration value as a string.

Parameters:
value - a duration value. Shall not be null.
Throws:
NullPointerException - if value is null.
IllegalArgumentException - if the given string is malformed.
IllegalArgumentException - if the resulting number of milliseconds is negative.
NumberFormatException - if the string does not contain parsable values.
See Also:
getValueString(), setValue(long)

setValue

public void setValue(long millis)
Initializes the duration value in milliseconds.

Parameters:
millis - a duration value.
Throws:
IllegalArgumentException - if millis is negative.
See Also:
getValue(), setValueString(java.lang.String)

getValue

public long getValue()
Returns the duration value in milliseconds.

Returns:
a duration value.
See Also:
setValue(long), getValueString()

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.