|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.baka.ambient.playlist.Parsers
public final class Parsers
Contains parsers for PLS, m3u, m3u8 and WPL playlists.
Method Summary | |
---|---|
static boolean |
hasMetadata(String filename)
Checks if given playlist contains metadata. |
static List<TrackMetadataBean> |
parse(File playlist)
Parses given playlist. |
static List<TrackMetadataBean> |
parseM3u(InputStream in,
String directory,
boolean unicode)
Parses the M3U playlist and returns list of tracks contained in the playlist. |
static List<TrackMetadataBean> |
parsePls(InputStream in,
String directory)
Parses the PLS playlist and returns list of tracks contained in the playlist. |
static List<TrackMetadataBean> |
parseWpl(InputStream in,
String directory)
Parses the WPL playlist and returns list of tracks contained in the playlist. |
static List<TrackMetadataBean> |
parseXspf(InputStream in,
String directory)
Parses the XSPF playlist and returns list of tracks contained in the playlist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static List<TrackMetadataBean> parsePls(InputStream in, String directory) throws IOException, ParseException
in
- the playlist stream. the stream is always closed.directory
- resolve all relative filenames against this directory. May be
null
if no resolving will be performed.
IOException
- if i/o error occurs.
ParseException
- on parse errorpublic static List<TrackMetadataBean> parseM3u(InputStream in, String directory, boolean unicode) throws IOException
in
- the playlist stream. the stream is always closed.directory
- resolve all relative filenames against this directory. May be
null
if no resolving will be performed.unicode
- if true
then the M3U8 UTF-8 encoding is used.
If false
then the M3U ISO8859_1 encoding is
used.
IOException
- if i/o error occurs.public static List<TrackMetadataBean> parseXspf(InputStream in, String directory) throws IOException, ParseException
in
- the playlist stream. the stream is always closed.directory
- resolve all relative filenames against this directory. May be
null
if no resolving will be performed.
IOException
- if i/o error occurs.
ParseException
- if parse exception occurs.public static List<TrackMetadataBean> parseWpl(InputStream in, String directory) throws IOException, ParseException
in
- the playlist stream. the stream is always closed.directory
- resolve all relative filenames against this directory. May be
null
if no resolving will be performed.
IOException
- if i/o error occurs.
ParseException
- if parse exception occurs.public static List<TrackMetadataBean> parse(File playlist) throws IOException, ParseException
playlist
- the playlist to parse.
IOException
- if i/o error occurs
ParseException
- if the playlist is not well formed or is of unknown type.public static boolean hasMetadata(String filename)
filename
- the file to check.
true
if the playlist contains track metadata,
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |