|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.ambient.playlist.Parsers
public final class Parsers
Contains parsers for PLS, m3u, m3u8 and WPL playlists.
| Method Summary | |
|---|---|
static boolean |
hasMetadata(java.lang.String filename)
Checks if given playlist contains metadata. |
static java.util.List<TrackMetadataBean> |
parse(java.io.File playlist)
Parses given playlist. |
static java.util.List<TrackMetadataBean> |
parseM3u(java.io.InputStream in,
java.lang.String directory,
boolean unicode)
Parses the M3U playlist and returns list of tracks contained in the playlist. |
static java.util.List<TrackMetadataBean> |
parsePls(java.io.InputStream in,
java.lang.String directory)
Parses the PLS playlist and returns list of tracks contained in the playlist. |
static java.util.List<TrackMetadataBean> |
parseWpl(java.io.InputStream in,
java.lang.String directory)
Parses the WPL playlist and returns list of tracks contained in the playlist. |
static java.util.List<TrackMetadataBean> |
parseXspf(java.io.InputStream in,
java.lang.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 java.util.List<TrackMetadataBean> parsePls(java.io.InputStream in,
java.lang.String directory)
throws java.io.IOException,
java.text.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.
java.io.IOException - if i/o error occurs.
java.text.ParseException - on parse error
public static java.util.List<TrackMetadataBean> parseM3u(java.io.InputStream in,
java.lang.String directory,
boolean unicode)
throws java.io.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.
java.io.IOException - if i/o error occurs.
public static java.util.List<TrackMetadataBean> parseXspf(java.io.InputStream in,
java.lang.String directory)
throws java.io.IOException,
java.text.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.
java.io.IOException - if i/o error occurs.
java.text.ParseException - if parse exception occurs.
public static java.util.List<TrackMetadataBean> parseWpl(java.io.InputStream in,
java.lang.String directory)
throws java.io.IOException,
java.text.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.
java.io.IOException - if i/o error occurs.
java.text.ParseException - if parse exception occurs.
public static java.util.List<TrackMetadataBean> parse(java.io.File playlist)
throws java.io.IOException,
java.text.ParseException
playlist - the playlist to parse.
java.io.IOException - if i/o error occurs
java.text.ParseException - if the playlist is not well formed or is of unknown type.public static boolean hasMetadata(java.lang.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 | |||||||||