|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.lightdev.lib.audio.PlaylistItem
com.lightdev.lib.audio.MP3PlaylistItem
public class MP3PlaylistItem
Class MP3PlaylistItem models a playlist item built from an MP3 audio file
| Field Summary | |
|---|---|
static char |
BLANK
constant used to assemble string representation of item |
static char |
BRACKET_CLOSE
constant used to assemble string representation of item |
static char |
BRACKET_OPEN
constant used to assemble string representation of item |
static char |
DASH
constant used to assemble string representation of item |
| Fields inherited from class com.lightdev.lib.audio.PlaylistItem |
|---|
audioFile, playing |
| Constructor Summary | |
|---|---|
MP3PlaylistItem(File audioFile)
constructor |
|
MP3PlaylistItem(String pathname)
constructor |
|
| Method Summary | |
|---|---|
String |
getAlbum()
get the album name |
String |
getArtist()
get the artist of this item |
Map |
getAudioProperties(File file)
get the properties of a given audio file Example properties: {mp3.frequency.hz=44100, title=All Cried Out, mp3.length.bytes=6301706, comment=, mp3.channels=2, date=1984, mp3.version.layer=3, mp3.framesize.bytes=414, mp3.id3tag.track=6, mp3.version.mpeg=1, mp3.bitrate.nominal.bps=128000, mp3.vbr.scale=0, bitrate=128000, mp3.length.frames=15112, mp3.crc=false, mp3.vbr=false, album=Alf, mp3.framerate.fps=38.28125, mp3.copyright=false, mp3.id3tag.v2=java.io.ByteArrayInputStream@7efa96, mp3.version.encoding=MPEG1L3, year=1984, mp3.id3tag.genre=Rock, mp3.header.pos=136, mp3.mode=0, mp3.original=true, vbr=false, mp3.padding=true, duration=394762000, author=Alison Moyet} |
long |
getByteSize()
get the size of this item in bytes |
long |
getDuration()
get the duration of this item |
String |
getTitle()
get the title of this item |
String |
toString()
build a string representation of this MP3PlaylistItem
This method preferably takes the information from the id3 tag
typically contained in an mp3 file. |
| Methods inherited from class com.lightdev.lib.audio.PlaylistItem |
|---|
getAudioFile, getPlayingIndicator, setPlayingIndicator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char BLANK
public static final char DASH
public static final char BRACKET_OPEN
public static final char BRACKET_CLOSE
| Constructor Detail |
|---|
public MP3PlaylistItem(File audioFile)
throws UnsupportedAudioFileException,
IOException
audioFile - File the audio file this MP3PlaylistItem represents
UnsupportedAudioFileException
IOException
public MP3PlaylistItem(String pathname)
throws UnsupportedAudioFileException,
IOException
pathname - String the path and name of the audio file this
MP3PlaylistItem represents
UnsupportedAudioFileException
IOException| Method Detail |
|---|
public String toString()
MP3PlaylistItem
This method preferably takes the information from the id3 tag typically contained in an mp3 file. If id3 tag information can not be found, the name of the mp3 file is used
toString in class ObjectMP3PlaylistItempublic long getDuration()
public String getTitle()
public String getAlbum()
public String getArtist()
public long getByteSize()
public Map getAudioProperties(File file)
throws UnsupportedAudioFileException,
IOException
Example
properties: {mp3.frequency.hz=44100, title=All Cried Out, mp3.length.bytes=6301706,
comment=, mp3.channels=2, date=1984, mp3.version.layer=3, mp3.framesize.bytes=414,
mp3.id3tag.track=6, mp3.version.mpeg=1, mp3.bitrate.nominal.bps=128000,
mp3.vbr.scale=0, bitrate=128000, mp3.length.frames=15112, mp3.crc=false,
mp3.vbr=false, album=Alf, mp3.framerate.fps=38.28125, mp3.copyright=false,
mp3.id3tag.v2=java.io.ByteArrayInputStream@7efa96, mp3.version.encoding=MPEG1L3,
year=1984, mp3.id3tag.genre=Rock, mp3.header.pos=136, mp3.mode=0,
mp3.original=true, vbr=false, mp3.padding=true, duration=394762000, author=Alison Moyet}
file - File the file to get the parameters for
UnsupportedAudioFileException
IOException
|
Copyright (c) 2004, 2005 Ulrich Hilger | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||