| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaudiotagger.tag.id3.AbstractTagItem
org.jaudiotagger.tag.id3.AbstractTag
org.jaudiotagger.tag.id3.AbstractID3Tag
org.jaudiotagger.tag.id3.AbstractID3v2Tag
org.jaudiotagger.tag.id3.ID3v22Tag
public class ID3v22Tag
Represents an ID3v2.2 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, although no compression scheme is defined in ID3v22  | 
static byte | 
MAJOR_VERSION
 | 
static int | 
MASK_V22_COMPRESSION
Bit mask to indicate tag is compressed, although compression is not actually defined in v22 so just ignored  | 
static int | 
MASK_V22_UNSYNCHRONIZATION
Bit mask to indicate tag is Unsychronization  | 
static byte | 
RELEASE
 | 
static byte | 
REVISION
 | 
protected static java.lang.String | 
TYPE_COMPRESSION
 | 
protected static java.lang.String | 
TYPE_UNSYNCHRONISATION
 | 
protected  boolean | 
unsynchronization
If set 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 | |
|---|---|
ID3v22Tag()
Creates a new empty ID3v2_2 tag.  | 
|
ID3v22Tag(AbstractTag mp3tag)
Constructs a new tag based upon another tag of different version/type  | 
|
ID3v22Tag(java.nio.ByteBuffer buffer)
Deprecated. use ID3v22Tag(ByteBuffer,String) instead | 
|
ID3v22Tag(java.nio.ByteBuffer buffer,
          java.lang.String loggingFilename)
Creates a new ID3v2_2 datatype.  | 
|
ID3v22Tag(ID3v22Tag copyObject)
Copy Constructor, creates a new ID3v2_2 Tag based on another ID3v2_2 Tag  | 
|
| Method Summary | |
|---|---|
protected  void | 
addFrame(AbstractID3v2Frame frame)
 | 
protected  void | 
copyPrimitives(AbstractID3v2Tag copyObj)
Copy primitives applicable to v2.2  | 
 TagField | 
createArtworkField(byte[] data,
                   java.lang.String mimeType)
 | 
 TagField | 
createField(Artwork artwork)
Create artwork field based on the data in artwork  | 
 ID3v22Frame | 
createFrame(java.lang.String id)
Create Frame  | 
 void | 
createStructure()
 | 
 TagField | 
createTagField(ID3v22FieldKey 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(ID3v22FieldKey id3v22FieldKey)
Delete fields with this id3v22FieldKey  | 
 boolean | 
equals(java.lang.Object obj)
Is this tag equivalent to another  | 
protected  java.lang.String | 
getAlbumId()
 | 
protected  java.lang.String | 
getArtistId()
 | 
 java.util.List<Artwork> | 
getArtworkList()
 | 
protected  java.lang.String | 
getCommentId()
 | 
 java.lang.String | 
getFirst(ID3v22FieldKey id3v22FieldKey)
Retrieve the first value that exists for this id3v22key  | 
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  | 
 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 frames rather than the size including padding recorded in the tag header  | 
protected  java.lang.String | 
getTitleId()
 | 
protected  java.lang.String | 
getTrackId()
 | 
protected  java.lang.String | 
getYearId()
 | 
 boolean | 
isCompression()
 | 
 boolean | 
isUnsynchronization()
 | 
 void | 
read(java.nio.ByteBuffer byteBuffer)
 | 
protected  void | 
readFrames(java.nio.ByteBuffer byteBuffer,
           int size)
Read frames from tag  | 
private  void | 
readHeaderFlags(java.nio.ByteBuffer byteBuffer)
Read tag 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 TDRC frames.  | 
 void | 
write(java.io.File file,
      long audioStartLocation)
Write tag to file.  | 
 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, toString, wait, wait, wait | 
| Methods inherited from interface org.jaudiotagger.tag.Tag | 
|---|
toString | 
| Field Detail | 
|---|
protected static final java.lang.String TYPE_COMPRESSION
protected static final java.lang.String TYPE_UNSYNCHRONISATION
public static final int MASK_V22_UNSYNCHRONIZATION
public static final int MASK_V22_COMPRESSION
protected boolean compression
protected boolean unsynchronization
public static final byte RELEASE
public static final byte MAJOR_VERSION
public static final byte REVISION
| Constructor Detail | 
|---|
public ID3v22Tag()
public ID3v22Tag(ID3v22Tag copyObject)
copyObject - public ID3v22Tag(AbstractTag mp3tag)
mp3tag - 
public ID3v22Tag(java.nio.ByteBuffer buffer,
                 java.lang.String loggingFilename)
          throws TagException
buffer - loggingFilename - 
TagException
public ID3v22Tag(java.nio.ByteBuffer buffer)
          throws TagException
ID3v22Tag(ByteBuffer,String) instead
buffer - 
TagException| Method Detail | 
|---|
public byte getRelease()
getRelease in class AbstractID3Tagpublic byte getMajorVersion()
getMajorVersion in class AbstractID3Tagpublic byte getRevision()
getRevision in class AbstractID3Tagprotected void copyPrimitives(AbstractID3v2Tag copyObj)
copyPrimitives in class AbstractID3v2Tagpublic java.lang.String getIdentifier()
AbstractID3Tag
getIdentifier in class AbstractID3Tagpublic int getSize()
getSize in class AbstractID3v2Tagpublic boolean equals(java.lang.Object obj)
AbstractID3v2Tag
equals in class AbstractID3v2Tagobj - 
protected void addFrame(AbstractID3v2Frame frame)
addFrame in class AbstractID3v2Tagpublic int readSize(java.nio.ByteBuffer buffer)
buffer - 
TagException
private void readHeaderFlags(java.nio.ByteBuffer byteBuffer)
                      throws TagException
byteBuffer - 
TagException
public void read(java.nio.ByteBuffer byteBuffer)
          throws TagException
read in class AbstractTagItembyteBuffer - file to read from
TagException - on any exception generated by this library.
protected void readFrames(java.nio.ByteBuffer byteBuffer,
                          int size)
byteBuffer - size - protected void translateFrame(AbstractID3v2Frame frame)
frame - 
private java.nio.ByteBuffer writeHeaderToBuffer(int padding,
                                                int size)
                                         throws java.io.IOException
padding - size - 
java.io.IOException
public void write(java.io.File file,
                  long audioStartLocation)
           throws java.io.IOException
write in class AbstractID3v2Tagjava.io.IOException - TODO should be abstract
public void write(java.nio.channels.WritableByteChannel channel)
           throws java.io.IOException
write in class AbstractID3v2Tagjava.io.IOException - TODO should be abstractpublic void createStructure()
createStructure in class AbstractID3v2Tagpublic boolean isUnsynchronization()
public boolean isCompression()
protected java.lang.String getArtistId()
getArtistId in class AbstractID3v2Tagprotected java.lang.String getAlbumId()
getAlbumId in class AbstractID3v2Tagprotected java.lang.String getTitleId()
getTitleId in class AbstractID3v2Tagprotected java.lang.String getTrackId()
getTrackId in class AbstractID3v2Tagprotected java.lang.String getYearId()
getYearId in class AbstractID3v2Tagprotected java.lang.String getCommentId()
getCommentId in class AbstractID3v2Tagprotected java.lang.String getGenreId()
getGenreId in class AbstractID3v2Tagpublic ID3v22Frame createFrame(java.lang.String id)
createFrame in class AbstractID3v2Tagid - frameid
public TagField createTagField(ID3v22FieldKey id3Key,
                               java.lang.String value)
                        throws KeyNotFoundException,
                               FieldDataInvalidException
id3Key - value - 
KeyNotFoundException
FieldDataInvalidException
public java.lang.String getFirst(ID3v22FieldKey id3v22FieldKey)
                          throws KeyNotFoundException
id3v22FieldKey - 
KeyNotFoundException
public void deleteTagField(ID3v22FieldKey id3v22FieldKey)
                    throws KeyNotFoundException
id3v22FieldKey - 
KeyNotFoundExceptionprotected AbstractID3v2Tag.FrameAndSubId getFrameAndSubIdFromGenericKey(FieldKey genericKey)
getFrameAndSubIdFromGenericKey in class AbstractID3v2Tagprotected ID3Frames getID3Frames()
getID3Frames in class AbstractID3v2Tagpublic java.util.Comparator getPreferredFrameOrderComparator()
getPreferredFrameOrderComparator in class AbstractID3v2Tagpublic java.util.List<Artwork> getArtworkList()
public TagField createField(Artwork artwork)
                     throws FieldDataInvalidException
FieldDataInvalidException
public TagField createArtworkField(byte[] data,
                                   java.lang.String mimeType)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||