BasePlaylist implementation.
This class implements Playlist interface using a Vector.
It support .m3u and .pls playlist format.
begin
public void begin()
Moves the cursor at the top of the playlist.
- begin in interface Playlist
getAllItems
public Collection getAllItems()
Returns a collection of playlist items.
- getAllItems in interface Playlist
getM3UHome
public String getM3UHome()
Get M3U home for relative playlist.
getPLSHome
public String getPLSHome()
Get PLS home for relative playlist.
getPlaylistSize
public int getPlaylistSize()
Returns then number of items in the playlist.
- getPlaylistSize in interface Playlist
isModified
public boolean isModified()
Checks the modification flag
- isModified in interface Playlist
load
public boolean load(String filename)
Loads playlist as M3U format.
- load in interface Playlist
loadM3U
protected boolean loadM3U(String filename)
Load playlist from M3U format.
loadPLS
protected boolean loadPLS(String filename)
Load playlist in PLS format.
nextCursor
public void nextCursor()
Computes cursor position (next).
- nextCursor in interface Playlist
previousCursor
public void previousCursor()
Computes cursor position (previous).
- previousCursor in interface Playlist
removeAllItems
public void removeAllItems()
Removes all items from the playlist.
- removeAllItems in interface Playlist
removeItemAt
public void removeItemAt(int pos)
Removes item at a given position from the playlist.
- removeItemAt in interface Playlist
save
public boolean save(String filename)
Saves playlist in M3U format.
- save in interface Playlist
setM3UHome
public void setM3UHome(String string)
Set optional M3U home for relative playlist.
setModified
public boolean setModified(boolean set)
Set the modification flag for the playlist
- setModified in interface Playlist
setPLSHome
public void setPLSHome(String string)
Set optional PLS home for relative playlist.
shuffle
public void shuffle()
Shuffles items in the playlist randomly
- shuffle in interface Playlist
sortItems
public void sortItems(int sortmode)
Sorts items of the playlist.
- sortItems in interface Playlist