|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthelliker.id3.ID3v2Tag
public class ID3v2Tag
This class reads and writes id3v2 tags from a file.
| Nested Class Summary | |
|---|---|
static class |
ID3v2Tag.CorruptHeaderException
|
| Constructor Summary | |
|---|---|
ID3v2Tag(File mp3)
Create an id3v2 tag bound to the file provided as a parameter. |
|
| Method Summary | |
|---|---|
void |
copyFrom(ID3Tag tag)
Copies information from the ID3Tag parameter and inserts it into this tag. |
APICImage |
getAttachedPicture()
|
byte[] |
getFrameData(String id)
Returns the data found in the frame specified by the id. |
String |
getFrameDataString(String id)
Returns the textual information contained in the frame specified by the id. |
int |
getTotalWrittenTagSize()
|
void |
removeFrame(String id)
Remove the frame with the specified id from the file. |
void |
removeTag()
Remove an existing id3v2 tag from the file passed to the constructor. |
void |
removeTag(boolean forceMpegOffset)
Removes this tag from the file it is bound to. |
void |
setAttachedPicture(APICImage pic)
|
void |
setCommentFrame(String description,
String comment)
Set the data contained in the comments frame (COMM). |
void |
setTextFrame(String id,
String data)
Set the data contained in a text frame. |
void |
setURLFrame(String id,
String data)
Set the data contained in a URL frame. |
void |
setUserDefinedTextFrame(String description,
String value)
Sets the data contained in the user defined text frame (TXXX). |
void |
setUserDefinedURLFrame(String description,
String value)
Sets the data contained in the user defined url frame (WXXX). |
boolean |
tagExists()
Returns true if an id3v2 tag exists in the file that was passed to the constructor and false otherwise |
String |
toString()
Return a string representation of this object. |
void |
updateFrameData(String id,
byte[] data)
Updates the data for the frame specified by id. |
void |
writeTag()
Saves all data in this tag to the file it is bound to. |
void |
writeTag(boolean forceMpegOffset)
Saves all the information in the tag to the file passed to the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ID3v2Tag(File mp3)
throws IOException,
ID3v2FormatException
mp3 - the file to write/read the the tag
information to/from
FileNotFoundException - if an error occurs
IOException - if an error occurs
ID3v2FormatException - if an exisiting id3v2 tag isn't correct| Method Detail |
|---|
public void writeTag()
throws IOException
ID3Tag
IOException - if an error occurs
public void writeTag(boolean forceMpegOffset)
throws IOException
FileNotFoundException - if an error occurs
IOException - if an error occurs
public void removeTag()
throws IOException
FileNotFoundException - if an error occurs
IOException - if an error occurs
public void removeTag(boolean forceMpegOffset)
throws IOException
ID3Tag
IOException - if an error occurspublic boolean tagExists()
public int getTotalWrittenTagSize()
public String toString()
toString in class Objectpublic void copyFrom(ID3Tag tag)
tag - the tag to copy from
public void setTextFrame(String id,
String data)
id - the id of the frame to set the data fordata - the data for the frame
public void setURLFrame(String id,
String data)
id - the id of the frame to set the data fordata - the data for the frame
public void setUserDefinedTextFrame(String description,
String value)
description - a description of the datavalue - the data for the frame
public void setUserDefinedURLFrame(String description,
String value)
description - a description of the urlvalue - the url for the frame
public void setCommentFrame(String description,
String comment)
description - a description of the commentcomment - the commentpublic void removeFrame(String id)
id - the id of the frame to remove
public void updateFrameData(String id,
byte[] data)
id - the id of the frame to updatedata - the data for the frame
public String getFrameDataString(String id)
throws ID3v2FormatException
id - the id of the frame to get text from
ID3v2FormatException - if an error is encountered parsing data
public APICImage getAttachedPicture()
throws ID3v2FormatException
ID3v2FormatExceptionpublic void setAttachedPicture(APICImage pic)
public byte[] getFrameData(String id)
id - the id of the frame to get the data from
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||