|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ID3Tag
Tag is an abstract superclass for implementations of ID3 tags and similar types of tags for music files. Tag defines the basic interface for such implementations, providing facilities to obtain and set the title, artist, album, track number and genre information as well as a comment for a given Tag. Subclasses must also provide a way to output themselves as a string and as a byte array suitable for inclusion as the tag portion of a mpeg-audio file. Writing the tag into a file at its proper location is not the responsibility of an Tag subclass; it is the responsibility of its user. The class com.tffenterprises.music.io.TaggedFile is a compliant user for ID3v1 and ID3v2, implementors of the Tag interface. Those two classes define static utilities to help in retrieving tags from instances of RandomAccessFile.
Method Summary | |
---|---|
java.lang.String |
getAlbum()
Return the name of the album or set on which thes track can be found |
java.lang.String |
getArtist()
Return the name of the artist or performer featured on the track represented by this tag |
byte[] |
getBytes()
Get a byte array equivalent to the tag's representation in a file. |
java.lang.String |
getComment()
Return a comment attached to the track. |
byte |
getGenre()
Return a byte representing the genre of the track. |
java.lang.String |
getTitle()
Return the title of the crack represented by this tag. |
byte |
getTrackNumber()
Return the track's position out of its set, as an integer. |
short |
getYear()
Return the year during which the track was recorded or released. |
boolean |
isChanged()
Returns whether or not the tag has been changed. |
void |
setAlbum(java.lang.String album)
Set the title of the album or set of which the track is extracted. |
void |
setArtist(java.lang.String artist)
Set the name of the artist or performer featured on the track |
void |
setChanged(boolean changed)
Sets or clears the "changed" bit. |
void |
setComment(java.lang.String comment)
Attach a comment relevant to the track. |
void |
setGenre(byte genre)
Set the byte representing the genre of the track. |
void |
setTitle(java.lang.String title)
Set the title of the track represented by this tag. |
void |
setTrackNumber(byte track)
Set the position of the track within its set. |
void |
setYear(short year)
Set the year during which the track was recorded or released. |
java.lang.String |
toString()
Get a String representation of the tag. |
Method Detail |
---|
java.lang.String getTitle()
java.lang.String getArtist()
java.lang.String getAlbum()
java.lang.String getComment()
byte getTrackNumber()
byte getGenre()
short getYear()
void setTitle(java.lang.String title)
title
- the title of the track represented by this tag.void setArtist(java.lang.String artist)
artist
- the name of the artist or performer featured on the track.void setAlbum(java.lang.String album)
album
- the title of the album or set of which the track
is extracted.void setComment(java.lang.String comment)
comment
- a comment relevant to the track.void setTrackNumber(byte track)
track
- the position of the track within its set.void setGenre(byte genre)
genre
- the byte representing the genre of the track.void setYear(short year)
year
- during which the track was recorded or released.boolean isChanged()
void setChanged(boolean changed)
changed
- true to set the changed bit, false to unset it.java.lang.String toString()
toString
in class java.lang.Object
byte[] getBytes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |