|
||||||||||
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.AbstractID3v1Tag org.jaudiotagger.tag.id3.ID3v1Tag org.jaudiotagger.tag.id3.ID3v11Tag
public class ID3v11Tag
Represents an ID3v11 tag.
Field Summary | |
---|---|
protected static int |
FIELD_COMMENT_LENGTH
|
protected static int |
FIELD_COMMENT_POS
|
protected static int |
FIELD_TRACK_INDICATOR_LENGTH
|
protected static int |
FIELD_TRACK_INDICATOR_POS
|
protected static int |
FIELD_TRACK_LENGTH
|
protected static int |
FIELD_TRACK_POS
|
private static byte |
MAJOR_VERSION
|
private static byte |
RELEASE
|
private static byte |
REVISION
|
protected byte |
track
Track is held as a single byte in v1.1 |
protected static int |
TRACK_MAX_VALUE
|
protected static int |
TRACK_MIN_VALUE
|
protected static int |
TRACK_UNDEFINED
|
protected static java.lang.String |
TYPE_TRACK
|
Fields inherited from class org.jaudiotagger.tag.id3.ID3v1Tag |
---|
album, artist, BYTE_TO_UNSIGNED, comment, genre, GENRE_UNDEFINED, tagFieldToID3v1Field, title, TYPE_COMMENT, year |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractID3v1Tag |
---|
END_OF_FIELD, endofStringPattern, FIELD_ALBUM_LENGTH, FIELD_ALBUM_POS, FIELD_ARTIST_LENGTH, FIELD_ARTIST_POS, FIELD_GENRE_LENGTH, FIELD_GENRE_POS, FIELD_TAGID_LENGTH, FIELD_TAGID_POS, FIELD_TITLE_LENGTH, FIELD_TITLE_POS, FIELD_YEAR_LENGTH, FIELD_YEAR_POS, logger, TAG_DATA_LENGTH, TAG_ID, TAG_LENGTH, TYPE_ALBUM, TYPE_ARTIST, TYPE_GENRE, TYPE_TITLE, TYPE_YEAR |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractID3Tag |
---|
TAG_RELEASE |
Fields inherited from class org.jaudiotagger.tag.id3.AbstractTag |
---|
TYPE_TAG |
Constructor Summary | |
---|---|
ID3v11Tag()
Creates a new ID3v11 datatype. |
|
ID3v11Tag(AbstractTag mp3tag)
Creates a new ID3v11 datatype from a non v11 tag |
|
ID3v11Tag(ID3v11Tag copyObject)
|
|
ID3v11Tag(java.io.RandomAccessFile file)
Deprecated. use ID3v11Tag(RandomAccessFile,String) instead |
|
ID3v11Tag(java.io.RandomAccessFile file,
java.lang.String loggingFilename)
Creates a new ID3v11 datatype. |
Method Summary | |
---|---|
void |
addTrack(java.lang.String track)
|
void |
createStructure()
Create strcutured representation of this item. |
void |
deleteField(FieldKey genericKey)
Delete any instance of tag fields with this key |
boolean |
equals(java.lang.Object obj)
Compares Object with this only returns true if both v1_1 tags with all fields set to same value |
int |
getFieldCount()
Return the number of fields |
java.util.List<TagField> |
getFields(FieldKey genericKey)
Returns a list of TagField objects whose "id"
is the specified one. |
java.lang.String |
getFirstComment()
Get Comment |
TagField |
getFirstField(java.lang.String id)
Retrieve the first field that exists for this format specific key |
java.lang.String |
getFirstTrack()
Return the track number as a String. |
byte |
getMajorVersion()
Retrieve the Major Version |
byte |
getRelease()
Retrieve the Release |
byte |
getRevision()
Retrieve the Revision |
java.util.List<TagField> |
getTrack()
|
boolean |
isEmpty()
Determines whether the tag has no fields specified. |
void |
read(java.nio.ByteBuffer byteBuffer)
Read in a tag from the ByteBuffer |
boolean |
seek(java.nio.ByteBuffer byteBuffer)
Find identifer within byteBuffer to indicate that a v11 tag exists within the buffer |
void |
setComment(java.lang.String comment)
Set Comment |
void |
setField(TagField field)
Sets a field in the structure, used internally by the library |
void |
setTrack(java.lang.String trackValue)
Set the track, v11 stores track numbers in a single byte value so can only handle a simple number in the range 0-255. |
void |
write(java.io.RandomAccessFile file)
Write this representation of tag to the file indicated |
Methods inherited from class org.jaudiotagger.tag.id3.ID3v1Tag |
---|
addField, addField, addField, createField, createField, deleteArtworkField, get, getAlbum, getArtist, getArtworkList, getComment, getEncoding, getFields, getFirst, getFirst, getFirstArtwork, getFirstField, getFirstGenre, getFirstTitle, getFirstYear, getGenre, getTitle, getYear, hasCommonFields, hasField, iterator, returnFieldToList, setAlbum, setArtist, setEncoding, setField, setField, setGenre, setTitle, setYear |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3v1Tag |
---|
delete, getSize |
Methods inherited from class org.jaudiotagger.tag.id3.AbstractID3Tag |
---|
getIdentifier, 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_TRACK
protected static final int TRACK_UNDEFINED
protected static final int TRACK_MAX_VALUE
protected static final int TRACK_MIN_VALUE
protected static final int FIELD_COMMENT_LENGTH
protected static final int FIELD_COMMENT_POS
protected static final int FIELD_TRACK_INDICATOR_LENGTH
protected static final int FIELD_TRACK_INDICATOR_POS
protected static final int FIELD_TRACK_LENGTH
protected static final int FIELD_TRACK_POS
protected byte track
private static final byte RELEASE
private static final byte MAJOR_VERSION
private static final byte REVISION
Constructor Detail |
---|
public ID3v11Tag()
public ID3v11Tag(ID3v11Tag copyObject)
public ID3v11Tag(AbstractTag mp3tag)
mp3tag
-
java.lang.UnsupportedOperationException
public ID3v11Tag(java.io.RandomAccessFile file, java.lang.String loggingFilename) throws TagNotFoundException, java.io.IOException
file
- loggingFilename
-
TagNotFoundException
java.io.IOException
public ID3v11Tag(java.io.RandomAccessFile file) throws TagNotFoundException, java.io.IOException
ID3v11Tag(RandomAccessFile,String)
instead
file
-
TagNotFoundException
java.io.IOException
Method Detail |
---|
public byte getRelease()
getRelease
in class ID3v1Tag
public byte getMajorVersion()
getMajorVersion
in class ID3v1Tag
public byte getRevision()
getRevision
in class ID3v1Tag
public int getFieldCount()
Tag
Fields with the same identifiers are counted seperately i.e two title fields would contribute two to the count
getFieldCount
in interface Tag
getFieldCount
in class ID3v1Tag
public void setComment(java.lang.String comment)
setComment
in class ID3v1Tag
comment
- public java.lang.String getFirstComment()
getFirstComment
in class ID3v1Tag
public void setTrack(java.lang.String trackValue)
trackValue
- public java.lang.String getFirstTrack()
getFirstTrack
in class ID3v1Tag
public void addTrack(java.lang.String track)
public java.util.List<TagField> getTrack()
getTrack
in class ID3v1Tag
public void setField(TagField field)
Tag
It is not recommended to use this method for normal use of the
audiolibrary. The developer will circumvent the underlying
implementation. For example, if one adds a field with the field id
"TALB" for an mp3 file, and the given
TagField
implementation does not return a text field compliant data with
TagField.getRawContent()
other software and the audio library
won't read the file correctly, if they do read it at all.
So for short:
field
- The field to add.
public java.util.List<TagField> getFields(FieldKey genericKey)
ID3v1Tag
TagField
objects whose "id"
is the specified one.
getFields
in interface Tag
getFields
in class ID3v1Tag
genericKey
- The generic field key
TagField
objects with the given "id".public TagField getFirstField(java.lang.String id)
Tag
Can be used to retrieve fields with any identifier, useful if the identifier is not within FieldKey
getFirstField
in interface Tag
getFirstField
in class ID3v1Tag
id
- audio specific key
public boolean isEmpty()
Tag
isEmpty
in interface Tag
isEmpty
in class ID3v1Tag
true
if tag contains no field.public void deleteField(FieldKey genericKey)
deleteField
in interface Tag
deleteField
in class ID3v1Tag
genericKey
- public boolean equals(java.lang.Object obj)
equals
in class ID3v1Tag
obj
- Comparing Object
public boolean seek(java.nio.ByteBuffer byteBuffer)
seek
in class ID3v1Tag
byteBuffer
-
public void read(java.nio.ByteBuffer byteBuffer) throws TagNotFoundException
read
in class ID3v1Tag
byteBuffer
- from where to read in a tag
TagNotFoundException
- if unable to read a tag in the byteBufferpublic void write(java.io.RandomAccessFile file) throws java.io.IOException
write
in class ID3v1Tag
file
- that this tag should be written to
java.io.IOException
- thrown if there were problems writing to the filepublic void createStructure()
ID3v1Tag
createStructure
in class ID3v1Tag
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |