|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object entagged.audioformats.mp3.Id3V2TagConverter
public final class Id3V2TagConverter
This class converts the fields (frames) from
tags from an older to a newer
version.
The best way to describe its function is to show an example:
Let's convert an Id3v2.3 tag into the version 2.4 and illustrate the need of
a special handler (like this class).
A major change in the version switch 2.3->2.4 occured on the information
of the recording time.
To represent a fully qualified date and time for that in the Id3v2.4 you will
just need the field (frame) "TDRC" which is a textfield containing
formatted date-time description. It allows mulitple time-patterns to be used,
the most accurate variation is "yyyy-MM-ddTHH:mm:ss" with
"THH" representing the hour out of 24.
For the same information you need three different fields (frames) with Id3v2.3. They are
So you see, If we want to convert this recoding time, we can't just simply
convert the names of the field. We must collect information and join the
data.
Who knows what else must be handled.
Field Summary | |
---|---|
static String |
DATE
Field name of the "TDAT" field of version v2.3. |
static String |
RECORD_DAT
Field name of the "TDAT" field of version v2.3. |
static String |
RECORDING_TIME
Field name of the "TDRC" field of version 2.4. |
static String |
TIME
Field name of the "TIME" field of version v2.3. |
static String |
YEAR
Field name of the "TYER" field of version v2.3. |
Constructor Summary | |
---|---|
Id3V2TagConverter()
|
Method Summary | |
---|---|
static Id3v2Tag |
convert(Id3v2Tag tag,
int targetVersion)
This method will convert the given tag into the given
Id3v2 version.Allowed values for targetVersion are:Id3v2Tag.ID3V23
Id3v2Tag.ID3V24
The version of the given
tag must be lower than the one to be converted two. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DATE
public static final String RECORD_DAT
public static final String TIME
public static final String YEAR
public static final String RECORDING_TIME
Constructor Detail |
---|
public Id3V2TagConverter()
Method Detail |
---|
public static Id3v2Tag convert(Id3v2Tag tag, int targetVersion)
tag
into the given
Id3v2 version.targetVersion
are:tag
must be lower than the one to be converted two.
tag
- The tag to be converted.targetVersion
- The version to be converted to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |