Lizzy v1.1.1

christophedelory.playlist.m3u
Class Resource

java.lang.Object
  extended by christophedelory.playlist.m3u.Resource

public class Resource
extends Object

A M3U or PLS playlist resource definition.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Resource()
           
 
Method Summary
 long getLength()
          Returns the resource playtime in seconds.
 String getLocation()
          Returns the location of this resource, as a string.
 String getName()
          Returns the name (or title) of this resource.
 void setLength(long seconds)
          Initializes the resource playtime in seconds.
 void setLocation(String location)
          Initializes the location of this resource from the specified string.
 void setName(String name)
          Initializes the name (or title) of this resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

getName

public String getName()
Returns the name (or title) of this resource. It is likely to be displayed by the player.

Returns:
the resource name. May be null.
See Also:
setName(java.lang.String)

setName

public void setName(String name)
Initializes the name (or title) of this resource.

Parameters:
name - a resource name. May be null.
See Also:
getName()

getLocation

public String getLocation()
Returns the location of this resource, as a string.

Returns:
the resource location. May be null if not yet initialized.
See Also:
setLocation(java.lang.String)

setLocation

public void setLocation(String location)
Initializes the location of this resource from the specified string. The string may represent a file or an URL.

Parameters:
location - a resource location. Shall not be null.
Throws:
NullPointerException - if location is null.
See Also:
getLocation()

getLength

public long getLength()
Returns the resource playtime in seconds. Defaults to -1 (unknown).

Returns:
a time length in seconds.
See Also:
setLength(long)

setLength

public void setLength(long seconds)
Initializes the resource playtime in seconds.

Parameters:
seconds - a time length in seconds.
See Also:
getLength()

© 2008-2009 Christophe Delory

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