|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Track
A Track is a single Track. It's created by the Database.create(org.qtunes.db.FieldMap)
method, which in turn gets
its values from a TrackReader
. A Track is made up of a number of AbstractField
classes, and it can be converted to audio sample by calling getAudioInputStream()
. Some
types of TrackReader
are also instances of TrackWriter
, and if that's the case
the Track can be updated by calling Database.updateTrack(int, org.qtunes.db.FieldMap)
.
Method Summary | ||
---|---|---|
void |
delete()
Delete the track from the database |
|
|
get(AbstractField<T> field)
Get the value of the specified Field. |
|
javax.sound.sampled.AudioInputStream |
getAudioInputStream()
Get the AudioInputStream for this track. |
|
java.util.Iterator<Field<?>> |
getFields()
Get an Iterator that moves over all the Field objects
in this Track |
|
java.io.File |
getFile()
Get the File this Track was loaded from |
|
java.nio.ByteBuffer |
getImageBuffer()
Get a ByteBuffer containing the image. |
|
int |
getIndex()
Get the index of this track in the database |
|
void |
update(FieldMap changes)
Update the fields on this Track. |
Method Detail |
---|
int getIndex()
<T> T get(AbstractField<T> field)
java.io.File getFile()
javax.sound.sampled.AudioInputStream getAudioInputStream() throws java.io.IOException
AudioInputStream
for this track. Don't
forget to close the stream once you're done.
java.io.IOException
java.nio.ByteBuffer getImageBuffer() throws java.io.IOException
ByteBuffer
containing the image. This maps
the file into memory, so the returned ByteBuffer should
be copied if the return value is not to be discarded
immediately.
java.io.IOException
java.util.Iterator<Field<?>> getFields()
Field
objects
in this Track
void delete()
void update(FieldMap changes) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |