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