at.tuwien.ifs.somtoolbox.apps.viewer.fileutils
Class PlayList
java.lang.Object
at.tuwien.ifs.somtoolbox.apps.viewer.fileutils.PlayList
public class PlayList
- extends Object
Add songs to a .m3u playlist and write the playlist file to disk
- Version:
- $Id: PlayList.java 3586 2010-05-21 10:34:19Z mayer $
- Author:
- Robert Neumayer
Method Summary |
boolean |
addSong(String song)
adds a song to the playlist |
void |
setSongs(Object[] sar)
set the contents of an object array as playlist |
void |
writeToFile()
write this playlist to the file specified in the constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
songs
private Vector<String> songs
file
private File file
PlayList
public PlayList(String fileName)
PlayList
public PlayList(File file)
addSong
public boolean addSong(String song)
- adds a song to the playlist
- Parameters:
song
- - song to add
- Returns:
- - true if okay, false otherwise
setSongs
public void setSongs(Object[] sar)
- set the contents of an object array as playlist
- Parameters:
sar
- - object array to be set as playlist (and casted to strings)
writeToFile
public void writeToFile()
- write this playlist to the file specified in the constructor