|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.AbstractSequentialList java.util.LinkedList helliker.id3.Playlist
Nested Class Summary |
Nested classes inherited from class java.util.LinkedList |
|
Nested classes inherited from class java.util.AbstractList |
|
Field Summary | |
static int |
MUSICMATCH_FORMAT
|
private java.lang.String |
PLAYLIST_EXT
|
static int |
WINAMP_FORMAT
|
Fields inherited from class java.util.LinkedList |
|
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
Playlist()
|
Method Summary | |
void |
addDirectory(java.io.File dir)
Reads in mp3s from a directory and adds them to this playlist. |
void |
addDirectory(java.io.File dir,
boolean recurse,
boolean sort)
Reads in mp3s from a directory and adds them to the this playlist. |
void |
loadFromFile(java.io.File m3uFile,
int format)
Load a playlist from a file. |
private void |
loadMusicMatchFile(java.io.BufferedReader reader)
Loads the contents of a MusicMatch playlist. |
private void |
loadWinampFile(java.io.BufferedReader reader)
Loads the contents of a winamp playlist. |
void |
sort()
Sorts this playlist by using the default path comparisons. |
void |
sort(java.util.Comparator cmp)
Sorts this playlist by using the specified comparator. |
java.lang.String |
toString()
Calls toString on every object contained within (very long). |
private void |
writeMusicMatchFile(java.io.PrintWriter printer)
Writes the contents of this playlist in MusicMatch format. |
void |
writeToFile(java.io.File dest,
int format)
Writes this playlist in the format specified. |
private void |
writeWinampFile(java.io.PrintWriter printer)
Write the contents of this playlist in Winamp format. |
Methods inherited from class java.util.LinkedList |
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
iterator |
Methods inherited from class java.util.AbstractList |
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, isEmpty, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Field Detail |
public static int WINAMP_FORMAT
public static int MUSICMATCH_FORMAT
private final java.lang.String PLAYLIST_EXT
Constructor Detail |
public Playlist()
Method Detail |
public void sort()
public void sort(java.util.Comparator cmp)
cmp
- the comparator to usepublic void addDirectory(java.io.File dir) throws java.io.IOException
dir
- the directory to look for mp3s in
java.io.IOException
- if the files specified is not a directorypublic void addDirectory(java.io.File dir, boolean recurse, boolean sort) throws java.io.IOException
dir
- the directory to look for mp3s inrecurse
- whether or not to recurse subdirectoriessort
- whether or not to sort each directory
java.io.IOException
- if the file specified is not a directorypublic void loadFromFile(java.io.File m3uFile, int format) throws PlaylistException, java.io.FileNotFoundException, java.io.IOException
m3uFile
- the playlist fileformat
- the type of playlist to load
PlaylistException
- if the file is corrupt
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occursprivate void loadWinampFile(java.io.BufferedReader reader) throws PlaylistException, java.io.IOException
reader
- the stream to read from
PlaylistException
- if an error occurs
java.io.IOException
- if an error occursprivate void loadMusicMatchFile(java.io.BufferedReader reader) throws PlaylistException, java.io.IOException
reader
- the stream to read from
PlaylistException
- if an error occurs
java.io.IOException
- if an error occurspublic void writeToFile(java.io.File dest, int format) throws java.io.IOException
dest
- where to save the playlistformat
- the format to write the file in
java.io.IOException
- if an error occursprivate void writeWinampFile(java.io.PrintWriter printer) throws java.io.IOException
printer
- the stream to write to
java.io.IOException
- if an error occursprivate void writeMusicMatchFile(java.io.PrintWriter printer) throws java.io.IOException
printer
- the stream to write to
java.io.IOException
- if an error occurspublic java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |