|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.AbstractSequentialList
java.util.LinkedList
helliker.id3.Playlist
public class Playlist
Description: This class is treated as a winamp styled playlist. It is essentially a collection of MP3Files that can be initalised from a file. Playlists can also be written based on it's data.
| Field Summary | |
|---|---|
static int |
MUSICMATCH_FORMAT
The MusicMatch format |
static int |
WINAMP_FORMAT
The Winamp M3u Format |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Playlist()
|
|
| Method Summary | |
|---|---|
void |
addDirectory(File dir)
Reads in mp3s from a directory and adds them to this playlist. |
void |
addDirectory(File dir,
boolean recurse,
boolean sort)
Reads in mp3s from a directory and adds them to the this playlist. |
void |
loadFromFile(File m3uFile,
int format)
Load a playlist from a file. |
void |
sort()
Sorts this playlist by using the default path comparisons. |
void |
sort(Comparator cmp)
Sorts this playlist by using the specified comparator. |
String |
toString()
Calls toString on every object contained within (very long). |
void |
writeToFile(File dest,
int format)
Writes this playlist in the format specified. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, 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 |
| Methods inherited from interface java.util.Deque |
|---|
iterator |
| Field Detail |
|---|
public static int WINAMP_FORMAT
public static int MUSICMATCH_FORMAT
| Constructor Detail |
|---|
public Playlist()
| Method Detail |
|---|
public void sort()
public void sort(Comparator cmp)
cmp - the comparator to use
public void addDirectory(File dir)
throws IOException
dir - the directory to look for mp3s in
IOException - if the files specified is not a directory
public void addDirectory(File dir,
boolean recurse,
boolean sort)
throws IOException
dir - the directory to look for mp3s inrecurse - whether or not to recurse subdirectoriessort - whether or not to sort each directory
IOException - if the file specified is not a directory
public void loadFromFile(File m3uFile,
int format)
throws PlaylistException,
IOException
m3uFile - the playlist fileformat - the type of playlist to load
PlaylistException - if the file is corrupt
FileNotFoundException - if an error occurs
IOException - if an error occurs
public void writeToFile(File dest,
int format)
throws IOException
dest - where to save the playlistformat - the format to write the file in
IOException - if an error occurspublic String toString()
toString in class AbstractCollection
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||