|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tffenterprises.music.tag.ID3v1
com.tffenterprises.music.tag.SmartID3v1
public class SmartID3v1
SmartID3v1 is an implementation of the so-called ID3v1.1 standard. An object can be constructed from a 125-byte array, from another implementor of the Tag interface or from scratch. If the construction of the object necessitated any string cleaning and/or data sanitization, the isChanged() method will return true on the fresh object (otherwise it will return false, until a later change is made). SmartID3v1 is different from ID3v1 in that it allows only the value -1 as as the genre byte, that is the genre "None". Any other value of the genre byte is effectively prohibited.
Field Summary |
---|
Fields inherited from class com.tffenterprises.music.tag.ID3v1 |
---|
ENCODING, GENRE_NONE, PREFIX, TAG_LENGTH |
Constructor Summary | |
---|---|
SmartID3v1()
Default constructor. |
|
SmartID3v1(byte[] byteArray)
Constructor from an array of bytes. |
|
SmartID3v1(ID3Tag oldTag)
Constructor from an implementor of Tag. |
|
SmartID3v1(ID3v1 oldTag)
Constructor copying data from another ID3v1 tag. |
Method Summary | |
---|---|
byte |
getGenre()
Returns a byte representing the genre of the track. |
void |
setGenre(byte genre)
Set the byte representing the genre of the track. |
Methods inherited from class com.tffenterprises.music.tag.ID3v1 |
---|
CheckFileForTag, clone, equals, getAlbum, getArtist, getBytes, getBytes, getChecksum, getComment, GetTagLength, GetTagOffset, getTitle, getTrackNumber, getYear, hashCode, isChanged, setAlbum, setArtist, setChanged, setComment, setGenre, setTitle, setTrackNumber, setYear, toString, ValidateYear, writeTo, writeTo |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.tffenterprises.music.tag.ID3Tag |
---|
getAlbum, getArtist, getBytes, getComment, getTitle, getTrackNumber, getYear, isChanged, setAlbum, setArtist, setChanged, setComment, setTitle, setTrackNumber, setYear, toString |
Constructor Detail |
---|
public SmartID3v1(byte[] byteArray) throws java.lang.IllegalArgumentException
byteArray
- an array of 125 bytes containing the data from
which the ID3v1 tag is to be extracted.
java.lang.IllegalArgumentException
- if the array is not 125 bytes long.public SmartID3v1()
public SmartID3v1(ID3Tag oldTag)
oldTag
- the ID3 instance from which to copy this ID3v1 object.public SmartID3v1(ID3v1 oldTag)
oldTag
- the ID3v1 instance to be copied.Method Detail |
---|
public byte getGenre()
getGenre
in interface ID3Tag
getGenre
in class ID3v1
public void setGenre(byte genre)
setGenre
in interface ID3Tag
setGenre
in class ID3v1
genre
- the byte representing the genre of the track.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |