public class MP3BaseID3v24 extends MP3BaseID3v23
This base class provides some underlying methods for working with an ID3v2.4 tag.
MP3BaseID3v24
Modifier and Type | Field and Description |
---|---|
protected ID3v24Tag |
id3v24Tag
ID3v2.4 tag which holds all the information about an .mp3 file
|
id3v23Tag
Constructor and Description |
---|
MP3BaseID3v24() |
Modifier and Type | Method and Description |
---|---|
ID3v24Frame |
addV24Frame(FrameType frameType)
add an ID3v2.4 frame of the specified type to the ID3v2.4 tag.
|
ID3v24Tag |
getID3v24Tag()
gets the ID3v2.4 Tag.
|
protected java.lang.String |
getV24Album()
finds the ID3v2.4
FrameType.ALBUM_TITLE text frame in the ID3v2.4 tag and retrieves the text field. |
protected AttachedPicture |
getV24AttachedPicture(PictureType pictureType)
finds the ID3v2.4
FrameType.ATTACHED_PICTURE frame in the ID3v2.4 tag and retrieves the attached picture. |
protected ID3v24Frame |
getV24AttachedPictureFrame(PictureType pictureType)
finds the ID3v2.4 attached picture frame containing the specified picture type in the ID3v2.4 tag.
|
protected java.util.List<AttachedPicture> |
getV24AttachedPictures()
finds all the ID3v2.4
FrameType.ATTACHED_PICTURE frames in the ID3v2.4 tag and retrieves the attached picture for each frame. |
int |
getV24AudioDuration()
finds the ID3v2.4
FrameType.LENGTH text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24Band()
finds the ID3v2.4
FrameType.BAND text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24Comments(Language language)
finds the song comments written in the specified language in the ID3v2.4 tag.
|
protected ID3v24Frame |
getV24CommentsFrame(Language language)
finds the ID3v2.4 comments frame with the specified language in the ID3v2.4 tag.
|
java.util.List<java.lang.String> |
getV24Errors()
gets a list of any frame errors encountered while reading in the ID3v2.4 tag.
|
ID3v24Frame |
getV24Frame(FrameType frameType)
finds the first ID3v2.4 frame in the ID3v2.4 tag with the specified ID3v2.4 frame id.
|
java.util.List<ID3v24Frame> |
getV24Frames(FrameType frameType)
finds all the ID3v2.4 frames in the ID3v2.4 tag with the specified ID3v2.4 frame id.
|
protected java.lang.String |
getV24LeadPerformer() |
protected java.lang.String |
getV24LyricsBy()
finds the ID3v2.4
FrameType.LYRICIST text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24MusicBy()
finds the ID3v2.4
FrameType.COMPOSER text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24MusicType()
finds the ID3v2.4
FrameType.CONTENT_TYPE text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24Publisher()
finds the ID3v2.4
FrameType.PUBLISHER text frame in the ID3v2.4 tag and retrieves the text field. |
protected int |
getV24Rating()
finds the ID3v2.4
FrameType.POPULARIMETER frame in the ID3v2.4 tag and retrieves the rating field. |
protected java.util.List<SynchronizedLyric> |
getV24SynchronizedLyrics(Language language)
finds the synchronized song lyrics in the specified language in the ID3v2.4 tag.
|
protected ID3v24Frame |
getV24SynchronizedLyricsFrame(Language language)
finds the ID3v2.4 synchronized lyrics frame containing in the specified language in the ID3v2.4 tag.
|
protected java.lang.String |
getV24Text(FrameType frameType)
finds the ID3v2.4 text frame with the specified ID3v2.4 frame type in the ID3v2.4 tag and retrieves the text field from the ID3v2.4 frame.
|
protected int |
getV24TextAsInteger(FrameType frameType)
gets the text from a text frame and converts it to an integer.
|
protected java.lang.String |
getV24Title()
finds the ID3v2.4
FrameType.SONG_TITLE text frame in the ID3v2.4 tag and retrieves the text field. |
protected int |
getV24Track()
finds the ID3v2.4
FrameType.TRACK_NUMBER text frame in the ID3v2.4 tag and retrieves the text field. |
protected java.lang.String |
getV24UnsynchronizedLyrics(Language language)
finds the unsynchronized song lyrics in the specified language in the ID3v2.4 tag.
|
protected ID3v24Frame |
getV24UnsynchronizedLyricsFrame(Language language)
finds the ID3v2.4 unsynchronized lyrics frame containing in the specified language in the ID3v2.4 tag.
|
int |
getV24Year()
finds the ID3v2.4
FrameType.RECORDING_TIME text frame in the ID3v2.4 tag and retrieves the text field. |
boolean |
hasV24Errors()
determines if the ID3v2.4 tag had any frame errors when it was read in.
|
protected ID3v24Frame |
removeV24Album()
removes the ID3v2.4
FrameType.ALBUM_TITLE text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24AttachedPicture(PictureType pictureType)
removes the ID3v2.4 attached picture frame with the specified picture type from the ID3v2.4 tag.
|
protected java.util.List<AttachedPicture> |
removeV24AttachedPictures()
removes all ID3v2.4 attached picture frames from the ID3v2.4 tag.
|
protected ID3v24Frame |
removeV24AudioDuration()
removes the ID3v2.4
FrameType.LENGTH text frame in the ID3v2.4 tag. |
protected void |
removeV24AudioSize()
does nothing.
|
protected ID3v24Frame |
removeV24Band()
removes the ID3v2.4
FrameType.BAND text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24Comments()
removes the english language song comments from the ID3v2.4 tag.
|
protected ID3v24Frame |
removeV24Comments(Language language)
removes the ID3v2.4 song comments written in the specified language from the ID3v2.4 tag.
|
ID3v24Frame |
removeV24Frame(FrameType frameType)
removes the first ID3v2.4 frame with the specified ID3v2.4 frame id from the ID3v2.4 tag.
|
java.util.List<ID3v24Frame> |
removeV24Frames(FrameType frameType)
removes all the ID3v2.4 frames with the specified ID3v2.4 frame id from the ID3v2.4 tag.
|
protected ID3v24Frame |
removeV24LeadPerformer()
removes the ID3v2.4
FrameType.LEAD_PERFORMER text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24LyricsBy()
removes the ID3v2.4
FrameType.LYRICIST text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24MusicBy()
removes the ID3v2.4
FrameType.COMPOSER text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24MusicType()
removes the ID3v2.4
FrameType.CONTENT_TYPE text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24Publisher()
removes the ID3v2.4
FrameType.PUBLISHER text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24Rating()
removes the ID3v2.4
FrameType.POPULARIMETER text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24SynchronizedLyrics(Language language)
removes the ID3v2.4 synchronized lyrics frame written in the specified language from the ID3v2.4 tag.
|
protected ID3v24Frame |
removeV24Title()
removes the ID3v2.4
FrameType.SONG_TITLE text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24Track()
removes the ID3v2.4
FrameType.TRACK_NUMBER text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
removeV24UnsynchronizedLyrics(Language language)
removes the ID3v2.4 unsynchronized lyrics frame written in the specified language from the ID3v2.4 tag.
|
protected ID3v24Frame |
removeV24Year()
removes the ID3v2.4
FrameType.RECORDING_TIME text frame in the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Album(java.lang.String album)
adds an ID3v2.4
FrameType.ALBUM_TITLE text frame with the specified album to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24AttachedPicture(AttachedPicture attachedPicture)
adds an ID3v2.4 attached picture frame with the specified picture type to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24AudioDuration(int duration)
adds an ID3v2.4
FrameType.LENGTH text frame with the specified duration to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Band(java.lang.String band)
adds an ID3v2.4
FrameType.BAND text frame with the specified band to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Comments(Language language,
java.lang.String comments)
adds an ID3v2.4 comments frame with the comments written in the specified language to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24LeadPerformer(java.lang.String leadPerformer)
adds an ID3v2.4
FrameType.LEAD_PERFORMER text frame with the specified lead performer to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24LyricsBy(java.lang.String lyricist)
adds an ID3v2.4
FrameType.LYRICIST text frame with the specified title to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24MusicBy(java.lang.String composer)
adds an ID3v2.4
FrameType.COMPOSER text frame with the specified title to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24MusicType(Genre genre)
adds an ID3v2.4
FrameType.CONTENT_TYPE text frame with the specified genre to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24MusicType(java.lang.String genre)
adds an ID3v2.4
FrameType.CONTENT_TYPE text frame with the specified genre to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Publisher(java.lang.String publisher)
adds an ID3v2.4
FrameType.PUBLISHER text frame with the specified title to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Rating(int rating)
adds an ID3v2.4
FrameType.POPULARIMETER frame with the specified rating to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24SynchronizedLyrics(Encoding encoding,
Language language,
java.util.List<SynchronizedLyric> synchronizedLyrics)
adds an ID3v2.4 synchronized lyrics frame with the specified song lyrics written in the given language to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24SynchronizedLyrics(Language language,
java.util.List<SynchronizedLyric> synchronizedLyrics)
adds an ID3v2.4 synchronized lyrics frame with the specified song lyrics written in the given language to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24SynchronizedLyrics(java.util.List<SynchronizedLyric> synchronizedLyrics)
adds an ID3v2.4 synchronized lyrics frame with the specified english song lyrics to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24Text(Encoding encoding,
java.lang.String text,
FrameType frameType)
adds an ID3v2.4 text frame with the specified text to the ID3v2.4 tag.
|
ID3v24Frame |
setV24Text(int n,
FrameType frameType)
adds an ID3v2.4 text frame with the string value of the specified integer to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24Text(java.lang.String text,
FrameType frameType)
adds an ID3v2.4 text frame with the specified text to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24Title(java.lang.String title)
adds an ID3v2.4
FrameType.SONG_TITLE text frame with the specified title to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24Track(int track)
adds an ID3v2.4
FrameType.TRACK_NUMBER text frame with the specified size to the ID3v2.4 tag. |
protected ID3v24Frame |
setV24UnsynchronizedLyrics(Language language,
java.lang.String lyrics)
adds an ID3v2.4 unsynchronized lyrics frame with the specified song lyrics written in the given language to the ID3v2.4 tag.
|
protected ID3v24Frame |
setV24Year(int year)
adds an ID3v2.4
FrameType.RECORDING_TIME text frame with the specified year to the ID3v2.4 tag. |
addV23Frame, getID3v23Tag, getV23Album, getV23AttachedPicture, getV23AttachedPictureFrame, getV23AttachedPictures, getV23AudioDuration, getV23AudioSize, getV23Band, getV23Comments, getV23CommentsFrame, getV23Errors, getV23Frame, getV23Frames, getV23LeadPerformer, getV23LyricsBy, getV23MusicBy, getV23MusicType, getV23Publisher, getV23Rating, getV23SynchronizedLyrics, getV23SynchronizedLyricsFrame, getV23Text, getV23TextAsInteger, getV23Title, getV23Track, getV23UnsynchronizedLyrics, getV23UnsynchronizedLyricsFrame, getV23Year, hasV23Errors, removeV23Album, removeV23AttachedPicture, removeV23AttachedPictures, removeV23AudioDuration, removeV23AudioSize, removeV23Band, removeV23Comments, removeV23Comments, removeV23Frame, removeV23Frames, removeV23LeadPerformer, removeV23LyricsBy, removeV23MusicBy, removeV23MusicType, removeV23Publisher, removeV23Rating, removeV23SynchronizedLyrics, removeV23Title, removeV23Track, removeV23UnsynchronizedLyrics, removeV23Year, setV23Album, setV23AttachedPicture, setV23AudioDuration, setV23AudioSize, setV23Band, setV23Comments, setV23LeadPerformer, setV23LyricsBy, setV23MusicBy, setV23MusicType, setV23MusicType, setV23Publisher, setV23Rating, setV23SynchronizedLyrics, setV23SynchronizedLyrics, setV23SynchronizedLyrics, setV23Text, setV23Text, setV23Text, setV23Title, setV23Track, setV23UnsynchronizedLyrics, setV23Year
protected ID3v24Tag id3v24Tag
public boolean hasV24Errors()
public java.util.List<java.lang.String> getV24Errors()
public ID3v24Tag getID3v24Tag()
public ID3v24Frame addV24Frame(FrameType frameType)
frameType
- type of ID3v2.4 frame to add to the ID3v2.4 tag.public ID3v24Frame getV24Frame(FrameType frameType)
frameType
- type of ID3v2.4 frame to search for.public java.util.List<ID3v24Frame> getV24Frames(FrameType frameType)
frameType
- type of ID3v2.4 frames to retrieve from the ID3v2.4 tag.public ID3v24Frame removeV24Frame(FrameType frameType)
frameType
- type of type ID3v2.4 frame to remove from the ID3v2.4 tag.public java.util.List<ID3v24Frame> removeV24Frames(FrameType frameType)
frameType
- type of ID3v2.4 frame to remove from the ID3v2.4 tag.protected java.lang.String getV24Album()
FrameType.ALBUM_TITLE
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.ALBUM_TITLE
text frame.
If no ID3v2.4 FrameType.ALBUM_TITLE
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24Album(java.lang.String album)
FrameType.ALBUM_TITLE
text frame with the specified album to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.ALBUM_TITLE
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.ALBUM_TITLE
text frame is added to the ID3v2.4 tag.album
- the name of the album on which the .mp3 song was released. The text is encoded using the UTF-16 character set.FrameType.ALBUM_TITLE
text frame that was added/updated.protected ID3v24Frame removeV24Album()
FrameType.ALBUM_TITLE
text frame in the ID3v2.4 tag.FrameType.ALBUM_TITLE
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.ALBUM_TITLE
text frame, then no frame is removed and null is returned.protected AttachedPicture getV24AttachedPicture(PictureType pictureType)
FrameType.ATTACHED_PICTURE
frame in the ID3v2.4 tag and retrieves the attached picture.pictureType
- one of the 21 allowable ID3v2.4 picture types.FrameType.ATTACHED_PICTURE
frame.
If no ID3v2.4 FrameType.ATTACHED_PICTURE
frame is found in the ID3v2.4 tag, then null is returned.protected java.util.List<AttachedPicture> getV24AttachedPictures()
FrameType.ATTACHED_PICTURE
frames in the ID3v2.4 tag and retrieves the attached picture for each frame.FrameType.ATTACHED_PICTURE
frames.
If no ID3v2.4 FrameType.ATTACHED_PICTURE
frames are found in the ID3v2.4 tag, then an empty list is returned.protected ID3v24Frame getV24AttachedPictureFrame(PictureType pictureType)
pictureType
- one of the 21 allowable ID3v2.4 picture types.protected ID3v24Frame setV24AttachedPicture(AttachedPicture attachedPicture)
attachedPicture
- an attached picture containing the information about the image to be added to the ID3V2.4 tag.protected ID3v24Frame removeV24AttachedPicture(PictureType pictureType)
pictureType
- one of the 21 valid ID3v2.4 picture types.protected java.util.List<AttachedPicture> removeV24AttachedPictures()
public int getV24AudioDuration()
FrameType.LENGTH
text frame in the ID3v2.4 tag and retrieves the text field.
The text field is then converted to an integer and returned.FrameType.LENGTH
text frame.
If no ID3v2.4 FrameType.LENGTH
text frame is found in the ID3v2.4 tag, or if the text field is not a valid integer,
then 0 is returned.protected ID3v24Frame setV24AudioDuration(int duration) throws java.lang.IllegalArgumentException
FrameType.LENGTH
text frame with the specified duration to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.LENGTH
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.LENGTH
text frame is added to the ID3v2.4 tag.duration
- the duration (in seconds) of the song in the .mp3 file.FrameType.LENGTH
text frame that was added/updated.java.lang.IllegalArgumentException
- If the duration is less than 0.protected ID3v24Frame removeV24AudioDuration()
FrameType.LENGTH
text frame in the ID3v2.4 tag.FrameType.LENGTH
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.LENGTH
text frame, then no frame is removed and null is returned.protected void removeV24AudioSize()
protected java.lang.String getV24Band()
FrameType.BAND
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.BAND
text frame.
If no ID3v2.4 FrameType.BAND
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24Band(java.lang.String band)
FrameType.BAND
text frame with the specified band to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.BAND
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.BAND
text frame is added to the ID3v2.4 tag.band
- the name of the band who recorded the song. The text is encoded using the UTF-16 character set.FrameType.BAND
text frame that was added/updated.protected ID3v24Frame removeV24Band()
FrameType.BAND
text frame in the ID3v2.4 tag.FrameType.BAND
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.BAND
text frame, then no frame is removed and null is returned.protected java.lang.String getV24Comments(Language language) throws java.lang.IllegalArgumentException
language
- the ISO-639-2 language code of the language the song comments are written in.java.lang.IllegalArgumentException
protected ID3v24Frame getV24CommentsFrame(Language language)
language
- the ISO-639-2 language code of the language the song comments are written in.protected ID3v24Frame setV24Comments(Language language, java.lang.String comments) throws java.lang.IllegalArgumentException
language
- the ISO-639-2 language code of the language the song comments are written in.comments
- the comments about the song.java.lang.IllegalArgumentException
- if the comments are empty or contain only whitespace.protected ID3v24Frame removeV24Comments() throws java.lang.IllegalStateException
java.lang.IllegalStateException
protected ID3v24Frame removeV24Comments(Language language) throws java.lang.IllegalArgumentException
language
- the ISO-639-2 language code of the language the song comments are written in.java.lang.IllegalArgumentException
protected java.lang.String getV24LeadPerformer()
protected ID3v24Frame setV24LeadPerformer(java.lang.String leadPerformer)
FrameType.LEAD_PERFORMER
text frame with the specified lead performer to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.LEAD_PERFORMER
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.LEAD_PERFORMER
text frame is added to the ID3v2.4 tag.
On Windows machines, this field is called "Contributing Artist".leadPerformer
- the name of the lead performer on which the .mp3 song was released. The text is encoded using the UTF-16 character set.FrameType.LEAD_PERFORMER
text frame that was added/updated.protected ID3v24Frame removeV24LeadPerformer()
FrameType.LEAD_PERFORMER
text frame in the ID3v2.4 tag.
On Windows machines, this field is called "Contributing Artist".FrameType.LEAD_PERFORMER
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.LEAD_PERFORMER
text frame, then no frame is removed and null is returned.protected java.lang.String getV24LyricsBy()
FrameType.LYRICIST
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.LYRICIST
text frame.
If no ID3v2.4 FrameType.LYRICIST
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24LyricsBy(java.lang.String lyricist)
FrameType.LYRICIST
text frame with the specified title to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.LYRICIST
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.LYRICIST
text frame is added to the ID3v2.4 tag.lyricist
- the person(s) who wrote the lyrics to the song. The text is encoded using the UTF-16 character set.FrameType.LYRICIST
text frame that was added/updated.protected ID3v24Frame removeV24LyricsBy()
FrameType.LYRICIST
text frame in the ID3v2.4 tag.FrameType.LYRICIST
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.LYRICIST
text frame, then no frame is removed and null is returned.protected java.lang.String getV24MusicBy()
FrameType.COMPOSER
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.COMPOSER
text frame.
If no ID3v2.4 FrameType.COMPOSER
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24MusicBy(java.lang.String composer)
FrameType.COMPOSER
text frame with the specified title to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.COMPOSER
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.COMPOSER
text frame is added to the ID3v2.4 tag.composer
- the person(s) who wrote the music to the song. The text is encoded using the UTF-16 character set.FrameType.COMPOSER
text frame that was added/updated.protected ID3v24Frame removeV24MusicBy()
FrameType.COMPOSER
text frame in the ID3v2.4 tag.FrameType.COMPOSER
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.COMPOSER
text frame, then no frame is removed and null is returned.protected java.lang.String getV24MusicType()
FrameType.CONTENT_TYPE
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.CONTENT_TYPE
text frame.
If no ID3v2.4 FrameType.CONTENT_TYPE
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24MusicType(Genre genre)
FrameType.CONTENT_TYPE
text frame with the specified genre to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.CONTENT_TYPE
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.CONTENT_TYPE
text frame is added to the ID3v2.4 tag.genre
- the song's music type. That is, the type of music the song would be described as. The text is encoded using the UTF-16 character set.FrameType.CONTENT_TYPE
text frame that was added/updated.protected ID3v24Frame setV24MusicType(java.lang.String genre)
FrameType.CONTENT_TYPE
text frame with the specified genre to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.CONTENT_TYPE
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.CONTENT_TYPE
text frame is added to the ID3v2.4 tag.genre
- the song's music type. That is, the type of music the song would be described as. The text is encoded using the UTF-16 character set.FrameType.CONTENT_TYPE
text frame that was added/updated.protected ID3v24Frame removeV24MusicType()
FrameType.CONTENT_TYPE
text frame in the ID3v2.4 tag.FrameType.CONTENT_TYPE
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.CONTENT_TYPE
text frame, then no frame is removed and null is returned.protected java.lang.String getV24Publisher()
FrameType.PUBLISHER
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.PUBLISHER
text frame.
If no ID3v2.4 FrameType.PUBLISHER
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24Publisher(java.lang.String publisher)
FrameType.PUBLISHER
text frame with the specified title to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.PUBLISHER
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.PUBLISHER
text frame is added to the ID3v2.4 tag.publisher
- the publisher of the song. The text is encoded using the UTF-16 character set.FrameType.PUBLISHER
text frame that was added/updated.protected ID3v24Frame removeV24Publisher()
FrameType.PUBLISHER
text frame in the ID3v2.4 tag.FrameType.PUBLISHER
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.PUBLISHER
text frame, then no frame is removed and null is returned.protected int getV24Rating()
FrameType.POPULARIMETER
frame in the ID3v2.4 tag and retrieves the rating field.FrameType.POPULARIMETER
frame.
If no ID3v2.4 FrameType.POPULARIMETER
frame is found in the ID3v2.4 tag, then 0 is returned.protected ID3v24Frame setV24Rating(int rating)
FrameType.POPULARIMETER
frame with the specified rating to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.POPULARIMETER
frame, then the existing frame's rating is simply updated.
Otherwise, a new ID3v2.4 FrameType.POPULARIMETER
frame is added to the ID3v2.4 tag.rating
- the rating of the song. The rating is 1-255 where 1 is worst and 255 is best. 0 is unknown, or unrated.FrameType.POPULARIMETER
frame that was added/updated.java.lang.IllegalArgumentException
- If the rating is less than 0 or greater than 255.protected ID3v24Frame removeV24Rating()
FrameType.POPULARIMETER
text frame in the ID3v2.4 tag.FrameType.POPULARIMETER
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.POPULARIMETER
text frame, then no frame is removed and null is returned.protected java.util.List<SynchronizedLyric> getV24SynchronizedLyrics(Language language)
language
- the ISO-639-2 language code of the language the song lyrics are written in.protected ID3v24Frame getV24SynchronizedLyricsFrame(Language language)
language
- the ISO-639-2 language code of the language the synchronized song lyrics are written in.protected ID3v24Frame setV24SynchronizedLyrics(java.util.List<SynchronizedLyric> synchronizedLyrics)
synchronizedLyrics
- the synchronized (english) lyrics to the song. The lyrics are encoded using the UTF-16 character set.protected ID3v24Frame setV24SynchronizedLyrics(Language language, java.util.List<SynchronizedLyric> synchronizedLyrics) throws java.lang.IllegalArgumentException
language
- the ISO-639-2 language code of the language the song lyrics are written in.synchronizedLyrics
- a list of synchronized lyrics to the song. The lyrics must be in chronological order.java.lang.IllegalArgumentException
- if the synchronized lyrics are not sorted in ascending chronological order.protected ID3v24Frame setV24SynchronizedLyrics(Encoding encoding, Language language, java.util.List<SynchronizedLyric> synchronizedLyrics) throws java.lang.IllegalArgumentException
encoding
- the character set used to encode the lyrics. Only ISO 8859-1 and UTF-16 are allowed.language
- the ISO-639-2 language code of the language the song lyrics are written in.synchronizedLyrics
- a list of synchronized lyrics to the song. The lyrics must be in chronological order.java.lang.IllegalArgumentException
- if the synchronized lyrics are not sorted in ascending chronological order.protected ID3v24Frame removeV24SynchronizedLyrics(Language language)
language
- the ISO-639-2 language code of the language the synchronized song lyrics are written in.protected java.lang.String getV24Text(FrameType frameType)
frameType
- one of the ID3v2.4 text frame types.protected int getV24TextAsInteger(FrameType frameType)
frameType
- ID3v2.4 text frame type.protected ID3v24Frame setV24Text(java.lang.String text, FrameType frameType)
text
- the text to be added to the ID3v2.4 tag. The text is encoded using the UTF-16 character set.frameType
- the type of ID3v2.4 text frame to add.public ID3v24Frame setV24Text(int n, FrameType frameType) throws java.lang.IllegalArgumentException
n
- the integer whose value will be converted to a string and stored in a text frame in the ID3v2.4 tag.
The text is encoded using the ISO 8859-1 character set.frameType
- the type of ID3v2.4 text frame to add.java.lang.IllegalArgumentException
- If the number n is <= 0.protected ID3v24Frame setV24Text(Encoding encoding, java.lang.String text, FrameType frameType)
encoding
- the character set used to encode the text. Only ISO 8859-1 and UTF-16 are allowed.text
- the text to be added to the ID3v2.4 tag.frameType
- the type of ID3v2.4 text frame to add.protected java.lang.String getV24Title()
FrameType.SONG_TITLE
text frame in the ID3v2.4 tag and retrieves the text field.FrameType.SONG_TITLE
text frame.
If no ID3v2.4 FrameType.SONG_TITLE
text frame is found in the ID3v2.4 tag, then null is returned.protected ID3v24Frame setV24Title(java.lang.String title)
FrameType.SONG_TITLE
text frame with the specified title to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.SONG_TITLE
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.SONG_TITLE
text frame is added to the ID3v2.4 tag.title
- the name of the .mp3 song. The text is encoded using the UTF-16 character set.FrameType.SONG_TITLE
text frame that was added/updated.protected ID3v24Frame removeV24Title()
FrameType.SONG_TITLE
text frame in the ID3v2.4 tag.FrameType.SONG_TITLE
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.SONG_TITLE
text frame, then no frame is removed and null is returned.protected int getV24Track()
FrameType.TRACK_NUMBER
text frame in the ID3v2.4 tag and retrieves the text field.
The text field is then converted to an integer and returned.FrameType.TRACK_NUMBER
text frame.
If no ID3v2.4 FrameType.TRACK_NUMBER
text frame is found in the ID3v2.4 tag, or if the text field is not a valid integer,
then 0 is returned.protected ID3v24Frame setV24Track(int track) throws java.lang.IllegalArgumentException
FrameType.TRACK_NUMBER
text frame with the specified size to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.TRACK_NUMBER
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.TRACK_NUMBER
text frame is added to the ID3v2.4 tag.track
- the track number of the song. It must be >= 1.FrameType.TRACK_NUMBER
text frame that was added/updated.java.lang.IllegalArgumentException
- If the duration is less than 1.protected ID3v24Frame removeV24Track()
FrameType.TRACK_NUMBER
text frame in the ID3v2.4 tag.FrameType.TRACK_NUMBER
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.TRACK_NUMBER
text frame, then no frame is removed and null is returned.protected java.lang.String getV24UnsynchronizedLyrics(Language language)
language
- the ISO-639-2 language code of the language the song lyrics are written in.protected ID3v24Frame getV24UnsynchronizedLyricsFrame(Language language)
language
- the ISO-639-2 language code of the language the unsynchronized song lyrics are written in.protected ID3v24Frame setV24UnsynchronizedLyrics(Language language, java.lang.String lyrics)
language
- the ISO-639-2 language code of the language the song lyrics are written in.lyrics
- the unsynchronized lyrics to the song.protected ID3v24Frame removeV24UnsynchronizedLyrics(Language language)
language
- the ISO-639-2 language code of the language the unsynchronized song lyrics are written in.public int getV24Year()
FrameType.RECORDING_TIME
text frame in the ID3v2.4 tag and retrieves the text field.
The text field is then converted to an integer and returned.FrameType.RECORDING_TIME
text frame.
If no ID3v2.4 FrameType.RECORDING_TIME
text frame is found in the ID3v2.4 tag, or if the text field is not a valid integer,
then 0 is returned.protected ID3v24Frame setV24Year(int year) throws java.lang.IllegalArgumentException
FrameType.RECORDING_TIME
text frame with the specified year to the ID3v2.4 tag.
If the ID3v2.4 tag already contains an ID3v2.4 FrameType.RECORDING_TIME
text frame, then the existing frame's text is simply updated.
Otherwise, a new ID3v2.4 FrameType.RECORDING_TIME
text frame is added to the ID3v2.4 tag.year
- the year the song was recorded. It must be >= 1.FrameType.RECORDING_TIME
text frame that was added/updated.java.lang.IllegalArgumentException
- If the year is less than 0.protected ID3v24Frame removeV24Year()
FrameType.RECORDING_TIME
text frame in the ID3v2.4 tag.FrameType.RECORDING_TIME
text frame that was removed.
If the ID3v2.4 tag does not contain an ID3v2.4 FrameType.RECORDING_TIME
text frame, then no frame is removed and null is returned.