sk.baka.ambient.stream.shoutcast
Class Radio

java.lang.Object
  extended by sk.baka.ambient.stream.shoutcast.Radio

public final class Radio
extends Object

A SHOUTcast radio station.

Author:
Martin Vysny

Field Summary
 String currentTrack
          currently played track, null if not known.
 String genre
          The radio genre.
 String id
          the radio ID
 String name
          The displayable radio station name.
 
Constructor Summary
Radio(String name, String id, String genre, String currentTrack)
          Creates new radio
 
Method Summary
static Radio fromXML(Attributes attrs)
          Parse the radio from given XML attributes.
 URL getPlaylistURL()
          Retrieves the radio playlist URL.
 List<TrackMetadataBean> getRadioURLs()
          Returns a list of URLs - radio sources.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final String name
The displayable radio station name.


id

public final String id
the radio ID


genre

public final String genre
The radio genre.


currentTrack

public final String currentTrack
currently played track, null if not known.

Constructor Detail

Radio

public Radio(String name,
             String id,
             String genre,
             String currentTrack)
Creates new radio

Parameters:
name - The displayable radio station name.
id - the radio ID
genre - The radio genre.
currentTrack - currently played track, null if not known.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getPlaylistURL

public URL getPlaylistURL()
                   throws MalformedURLException
Retrieves the radio playlist URL.

Returns:
the URL
Throws:
MalformedURLException

getRadioURLs

public List<TrackMetadataBean> getRadioURLs()
                                     throws IOException,
                                            ParseException
Returns a list of URLs - radio sources. Blocks until the list is retrieved.

Returns:
non-null list of radio sources, read-only.
Throws:
IOException - if i/o error occurs.
ParseException - if the playlist is not well formed.

fromXML

public static Radio fromXML(Attributes attrs)
Parse the radio from given XML attributes.

Parameters:
attrs - the attributes to parse
Returns:
radio instance, never null.


Copyright © 2007-2008. All Rights Reserved.