|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--helliker.id3.ID3v1Tag
Constructor Summary | |
ID3v1Tag(java.io.File mp3)
Create an id3v1tag from the file specified. |
Method Summary | |
void |
copyFrom(ID3Tag tag)
Copies information from the ID3Tag parameter and inserts it into this tag. |
java.lang.String |
getAlbum()
Return the album field of the tag |
java.lang.String |
getArtist()
Return the artist field of the tag |
byte[] |
getBytes()
Returns a binary representation of this id3v1 tag. |
java.lang.String |
getComment()
Return the comment field of the tag |
int |
getGenre()
Return the genre field of the tag |
java.lang.String |
getGenreString()
Return the genre name based on the ID3/Nullsoft standards. |
int |
getSize()
Return the size in bytes of the tag. |
java.lang.String |
getTitle()
Return the title field of the tag |
int |
getTrack()
Return the track field of the tag |
java.lang.String |
getYear()
Return the year field of the tag |
void |
removeTag()
Removes the id3v1 tag from the file specified in the constructor |
void |
setAlbum(java.lang.String newAlbum)
Set the album field of the tag. |
void |
setArtist(java.lang.String newArtist)
Set the artist field of the tag. |
void |
setComment(java.lang.String newComment)
Set the comment field of the tag. |
void |
setGenre(int newGenre)
Set the genre field of the tag. |
boolean |
setGenreString(java.lang.String str)
Attempt to set the genre value of this tag from the string specified. |
void |
setTitle(java.lang.String newTitle)
Set the title field of the tag. |
void |
setTrack(int newTrack)
Set the track field of the tag. |
void |
setYear(java.lang.String newYear)
Set the year field of the tag. |
boolean |
tagExists()
Checks if a tag exists |
java.lang.String |
toString()
Returns a String representation of this object. |
void |
writeTag()
Writes the information in this tag to the file specified in the constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ID3v1Tag(java.io.File mp3) throws java.io.FileNotFoundException, java.io.IOException
mp3
- the file to read/write the tag to
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occursMethod Detail |
public void writeTag() throws java.io.FileNotFoundException, java.io.IOException
writeTag
in interface ID3Tag
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occurspublic byte[] getBytes()
getBytes
in interface ID3Tag
public void removeTag() throws java.io.FileNotFoundException, java.io.IOException
removeTag
in interface ID3Tag
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occurspublic java.lang.String getGenreString()
public boolean setGenreString(java.lang.String str)
str
- the string value of the genre to attempt to set
public boolean tagExists()
public java.lang.String getTitle()
public void setTitle(java.lang.String newTitle)
newTitle
- the title for the tagpublic java.lang.String getArtist()
public void setArtist(java.lang.String newArtist)
newArtist
- the artist for the tagpublic java.lang.String getAlbum()
public void setAlbum(java.lang.String newAlbum)
newAlbum
- the album for the tagpublic java.lang.String getYear()
public void setYear(java.lang.String newYear)
newYear
- the year for the tagpublic java.lang.String getComment()
public void setComment(java.lang.String newComment)
newComment
- the comment of the tagpublic int getTrack()
public void setTrack(int newTrack)
newTrack
- the track of the tagpublic int getGenre()
public void setGenre(int newGenre) throws ID3FieldDataException
newGenre
- the genre of the tag
ID3FieldDataException
- if the value supplie is invalidpublic int getSize()
public java.lang.String toString()
toString
in class java.lang.Object
public void copyFrom(ID3Tag tag)
copyFrom
in interface ID3Tag
tag
- the tag to copy from
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |