|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.tag.id3.AbstractTagItem org.jaudiotagger.tag.id3.AbstractTag org.jaudiotagger.tag.id3.AbstractID3Tag org.jaudiotagger.tag.id3.AbstractID3v2Tag org.jaudiotagger.tag.id3.ID3v23Tag
public class ID3v23Tag
Represents an ID3v2.3 tag.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jaudiotagger.tag.id3.AbstractID3v2Tag |
---|
AbstractID3v2Tag.FrameAndSubId |
Field Summary | |
---|---|
protected boolean |
compression
The tag is compressed |
private int |
crc32
Crcdata Checksum in extended header |
protected boolean |
crcDataFlag
CRC Checksum calculated |
protected boolean |
experimental
Experiemntal tag |
protected boolean |
extended
Contains extended header |
protected static int |
FIELD_TAG_EXT_SIZE_LENGTH
|
static byte |
MAJOR_VERSION
|
static int |
MASK_V23_CRC_DATA_PRESENT
ID3v2.3 Extended Header bit mask |
static int |
MASK_V23_EMBEDDED_INFO_FLAG
ID3v2.3 RBUF frame bit mask |
static int |
MASK_V23_EXPERIMENTAL
ID3v2.3 Header bit mask |
static int |
MASK_V23_EXTENDED_HEADER
ID3v2.3 Header bit mask |
static int |
MASK_V23_UNSYNCHRONIZATION
ID3v2.3 Header bit mask |
private int |
paddingSize
Tag padding |
static byte |
RELEASE
|
static byte |
REVISION
|
protected static int |
TAG_EXT_HEADER_CRC_LENGTH
|
protected static int |
TAG_EXT_HEADER_DATA_LENGTH
|
protected static int |
TAG_EXT_HEADER_LENGTH
|
protected static java.lang.String |
TYPE_CRCDATA
|
protected static java.lang.String |
TYPE_EXPERIMENTAL
|
protected static java.lang.String |
TYPE_EXTENDED
|
protected static java.lang.String |
TYPE_PADDINGSIZE
|
protected static java.lang.String |
TYPE_UNSYNCHRONISATION
|
protected boolean |
unsynchronization
All frames in the tag uses unsynchronisation |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractID3Tag |
---|
logger, TAG_RELEASE |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTag |
---|
TYPE_TAG |
Constructor Summary | |
---|---|
ID3v23Tag()
Creates a new empty ID3v2_3 datatype. |
|
ID3v23Tag(AbstractTag mp3tag)
Constructs a new tag based upon another tag of different version/type |
|
ID3v23Tag(java.nio.ByteBuffer buffer)
Deprecated. use ID3v23Tag(ByteBuffer,String) instead |
|
ID3v23Tag(java.nio.ByteBuffer buffer,
java.lang.String loggingFilename)
Creates a new ID3v2_3 datatype. |
|
ID3v23Tag(ID3v23Tag copyObject)
Copy Constructor, creates a new ID3v2_3 Tag based on another ID3v2_3 Tag |
Method Summary | |
---|---|
protected void |
addFrame(AbstractID3v2Frame frame)
|
protected void |
copyPrimitives(AbstractID3v2Tag copyObj)
Copy primitives applicable to v2.3 |
TagField |
createArtworkField(byte[] data,
java.lang.String mimeType)
Create Artwork |
TagField |
createField(Artwork artwork)
Create artwork field based on the data in artwork |
ID3v23Frame |
createFrame(java.lang.String id)
Create Frame of correct ID3 version with the specified id |
void |
createStructure()
For representing the MP3File in an XML Format |
TagField |
createTagField(ID3v23FieldKey id3Key,
java.lang.String value)
Create Frame for Id3 Key Only textual data supported at the moment, should only be used with frames that support a simple string argument. |
void |
deleteTagField(ID3v23FieldKey id3v23FieldKey)
Delete fields with this id3v23FieldKey |
boolean |
equals(java.lang.Object obj)
Is Tag Equivalent to another tag |
protected java.lang.String |
getAlbumId()
|
protected java.lang.String |
getArtistId()
|
java.util.List<Artwork> |
getArtworkList()
|
protected java.lang.String |
getCommentId()
|
int |
getCrc32()
|
java.lang.String |
getFirst(ID3v23FieldKey id3v23FieldKey)
Retrieve the first value that exists for this id3v23key |
protected AbstractID3v2Tag.FrameAndSubId |
getFrameAndSubIdFromGenericKey(FieldKey genericKey)
|
protected java.lang.String |
getGenreId()
|
protected ID3Frames |
getID3Frames()
|
java.lang.String |
getIdentifier()
Get full version |
byte |
getMajorVersion()
Retrieve the Major Version |
int |
getPaddingSize()
|
java.util.Comparator |
getPreferredFrameOrderComparator()
|
byte |
getRelease()
Retrieve the Release |
byte |
getRevision()
Retrieve the Revision |
int |
getSize()
Return frame size based upon the sizes of the tags rather than the physical no of bytes between start of ID3Tag and start of Audio Data. |
protected java.lang.String |
getTitleId()
|
protected java.lang.String |
getTrackId()
|
protected java.lang.String |
getYearId()
|
boolean |
isUnsynchronization()
|
void |
read(java.nio.ByteBuffer buffer)
|
private void |
readExtendedHeader(java.nio.ByteBuffer buffer,
int size)
Read the optional extended header |
protected void |
readFrames(java.nio.ByteBuffer byteBuffer,
int size)
Read the frames Read from byteBuffer upto size |
private void |
readHeaderFlags(java.nio.ByteBuffer buffer)
Read header flags |
int |
readSize(java.nio.ByteBuffer buffer)
Read the size of a tag, based on the value written in the tag header |
protected void |
translateFrame(AbstractID3v2Frame frame)
This is used when we need to translate a single frame into multiple frames, currently required for v24 TDRC frames. |
void |
write(java.io.File file,
long audioStartLocation)
Write tag to file TODO:we currently never write the Extended header , but if we did the size calculation in this method would be slightly incorrect |
void |
write(java.nio.channels.WritableByteChannel channel)
Write tag to channel. |
private java.nio.ByteBuffer |
writeHeaderToBuffer(int padding,
int size)
Write the ID3 header to the ByteBuffer. |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3Tag |
---|
getLoggingFilename, setLoggingFilename, toString |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractTagItem |
---|
isSubsetOf |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jaudiotagger.tag.Tag |
---|
toString |
Field Detail |
---|
protected static final java.lang.String TYPE_CRCDATA
protected static final java.lang.String TYPE_EXPERIMENTAL
protected static final java.lang.String TYPE_EXTENDED
protected static final java.lang.String TYPE_PADDINGSIZE
protected static final java.lang.String TYPE_UNSYNCHRONISATION
protected static int TAG_EXT_HEADER_LENGTH
protected static int TAG_EXT_HEADER_CRC_LENGTH
protected static int FIELD_TAG_EXT_SIZE_LENGTH
protected static int TAG_EXT_HEADER_DATA_LENGTH
public static final int MASK_V23_UNSYNCHRONIZATION
public static final int MASK_V23_EXTENDED_HEADER
public static final int MASK_V23_EXPERIMENTAL
public static final int MASK_V23_CRC_DATA_PRESENT
public static final int MASK_V23_EMBEDDED_INFO_FLAG
protected boolean crcDataFlag
protected boolean experimental
protected boolean extended
private int crc32
private int paddingSize
protected boolean unsynchronization
protected boolean compression
public static final byte RELEASE
public static final byte MAJOR_VERSION
public static final byte REVISION
Constructor Detail |
---|
public ID3v23Tag()
public ID3v23Tag(ID3v23Tag copyObject)
copyObject
- public ID3v23Tag(AbstractTag mp3tag)
mp3tag
- public ID3v23Tag(java.nio.ByteBuffer buffer, java.lang.String loggingFilename) throws TagException
buffer
- loggingFilename
-
TagException
public ID3v23Tag(java.nio.ByteBuffer buffer) throws TagException
ID3v23Tag(ByteBuffer,String)
instead
buffer
-
TagException
Method Detail |
---|
public byte getRelease()
getRelease
in class AbstractID3Tag
public byte getMajorVersion()
getMajorVersion
in class AbstractID3Tag
public byte getRevision()
getRevision
in class AbstractID3Tag
public int getCrc32()
protected void copyPrimitives(AbstractID3v2Tag copyObj)
copyPrimitives
in class AbstractID3v2Tag
protected void addFrame(AbstractID3v2Frame frame)
addFrame
in class AbstractID3v2Tag
protected void translateFrame(AbstractID3v2Frame frame)
frame
- public java.lang.String getIdentifier()
AbstractID3Tag
getIdentifier
in class AbstractID3Tag
public int getSize()
getSize
in class AbstractID3v2Tag
public boolean equals(java.lang.Object obj)
equals
in class AbstractID3v2Tag
obj
-
public int readSize(java.nio.ByteBuffer buffer)
buffer
-
TagException
private void readHeaderFlags(java.nio.ByteBuffer buffer) throws TagException
Log info messages for falgs that have been set and log warnings when bits have been set for unknown flags
buffer
-
TagException
private void readExtendedHeader(java.nio.ByteBuffer buffer, int size)
buffer
- size
- public void read(java.nio.ByteBuffer buffer) throws TagException
read
in class AbstractTagItem
buffer
- file to read from
TagException
- on any exception generated by this library.protected void readFrames(java.nio.ByteBuffer byteBuffer, int size)
byteBuffer
- size
- private java.nio.ByteBuffer writeHeaderToBuffer(int padding, int size) throws java.io.IOException
padding
- is the size of the padding portion of the tagsize
- is the size of the body data
java.io.IOException
public void write(java.io.File file, long audioStartLocation) throws java.io.IOException
write
in class AbstractID3v2Tag
file
- The file to write to
java.io.IOException
public void write(java.nio.channels.WritableByteChannel channel) throws java.io.IOException
write
in class AbstractID3v2Tag
java.io.IOException
- TODO should be abstractpublic void createStructure()
createStructure
in class AbstractID3v2Tag
public boolean isUnsynchronization()
protected java.lang.String getArtistId()
getArtistId
in class AbstractID3v2Tag
protected java.lang.String getAlbumId()
getAlbumId
in class AbstractID3v2Tag
protected java.lang.String getTitleId()
getTitleId
in class AbstractID3v2Tag
protected java.lang.String getTrackId()
getTrackId
in class AbstractID3v2Tag
protected java.lang.String getYearId()
getYearId
in class AbstractID3v2Tag
protected java.lang.String getCommentId()
getCommentId
in class AbstractID3v2Tag
protected java.lang.String getGenreId()
getGenreId
in class AbstractID3v2Tag
public ID3v23Frame createFrame(java.lang.String id)
AbstractID3v2Tag
createFrame
in class AbstractID3v2Tag
public TagField createTagField(ID3v23FieldKey id3Key, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
id3Key
- value
-
KeyNotFoundException
FieldDataInvalidException
public java.lang.String getFirst(ID3v23FieldKey id3v23FieldKey) throws KeyNotFoundException
id3v23FieldKey
-
KeyNotFoundException
public void deleteTagField(ID3v23FieldKey id3v23FieldKey) throws KeyNotFoundException
id3v23FieldKey
-
KeyNotFoundException
protected AbstractID3v2Tag.FrameAndSubId getFrameAndSubIdFromGenericKey(FieldKey genericKey)
getFrameAndSubIdFromGenericKey
in class AbstractID3v2Tag
protected ID3Frames getID3Frames()
getID3Frames
in class AbstractID3v2Tag
public java.util.Comparator getPreferredFrameOrderComparator()
getPreferredFrameOrderComparator
in class AbstractID3v2Tag
public java.util.List<Artwork> getArtworkList()
public TagField createField(Artwork artwork) throws FieldDataInvalidException
FieldDataInvalidException
public TagField createArtworkField(byte[] data, java.lang.String mimeType)
data
- mimeType
- of the image
PictureTypes
public int getPaddingSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |