|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.stream.shoutcast.ShoutcastUtils
public final class ShoutcastUtils
Utility methods for SHOUTcast support.
| Field Summary | |
|---|---|
static java.net.URL |
GENRES_LIST
The genres list XML location. |
| Method Summary | |
|---|---|
static java.util.List<Radio> |
getRadioList(java.io.InputStream in)
Parses the XML radio list and returns parsed object instances. |
static java.util.List<Radio> |
getRadioList(java.lang.String genre)
Parses the server-side XML radio list and returns parsed object instances. |
static java.util.List<java.lang.String> |
parseGenres()
Parses the SHOUTcast genre list XML. |
static java.util.List<java.lang.String> |
parseGenres(java.io.InputStream in)
Parses the SHOUTcast genre list XML. |
static java.util.List<TrackMetadataBean> |
parsePlaylist(java.io.InputStream in)
Parses a playlist and returns list of all radio URLs (the File?=... lines; other lines are ignored). |
static java.lang.String |
removeAsciiGraphics(java.lang.String string)
Removes the ASCII graphics from the string start and end. |
static void |
sortByName(java.util.List<Radio> radioList)
Sorts given radio list by name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.net.URL GENRES_LIST
| Method Detail |
|---|
public static java.util.List<TrackMetadataBean> parsePlaylist(java.io.InputStream in)
throws java.io.IOException,
java.text.ParseException
File?=... lines; other lines are ignored).
in - the playlist stream. the stream is always closed.
java.io.IOException - if i/o error occurs.
java.text.ParseException - if the playlist is not well formed.
public static java.util.List<java.lang.String> parseGenres()
throws java.io.IOException,
org.xml.sax.SAXException
java.io.IOException
org.xml.sax.SAXException
public static java.util.List<java.lang.String> parseGenres(java.io.InputStream in)
throws java.io.IOException,
org.xml.sax.SAXException
in - the XML to read. the stream is always closed.
java.io.IOException
org.xml.sax.SAXException
public static java.util.List<Radio> getRadioList(java.lang.String genre)
throws java.io.IOException,
org.xml.sax.SAXException
genre - the genre
org.xml.sax.SAXException
java.io.IOException - if i/o error occurs.
public static java.util.List<Radio> getRadioList(java.io.InputStream in)
throws java.io.IOException,
org.xml.sax.SAXException
in - the XML to parse
org.xml.sax.SAXException
java.io.IOException - if i/o error occurs.public static void sortByName(java.util.List<Radio> radioList)
radioList - the list to sort.public static java.lang.String removeAsciiGraphics(java.lang.String string)
string - the string
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||