Modifier and Type | Field and Description |
---|---|
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 |
album, artist, BYTE_TO_UNSIGNED, comment, genre, GENRE_UNDEFINED, tagFieldToID3v1Field, title, TYPE_COMMENT, year
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
TAG_RELEASE
TYPE_TAG
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addTrack(java.lang.String track) |
void |
createStructure()
Create structured 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)
|
java.lang.String |
getFirst(FieldKey genericKey)
Retrieve the first value that exists for this generic key
|
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 identifier 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
|
addField, addField, addField, createCompilationField, createField, createField, deleteArtworkField, deleteField, getAlbum, getAll, getArtist, getArtworkList, getComment, getEncoding, getFieldCountIncludingSubValues, getFields, getFields, getFirst, getFirstAlbum, getFirstArtist, getFirstArtwork, getFirstField, getFirstGenre, getFirstTitle, getFirstYear, getGenre, getSubValue, getTitle, getValue, getYear, hasCommonFields, hasField, hasField, iterator, returnFieldToList, setAlbum, setArtist, setEncoding, setField, setField, setGenre, setTitle, setYear
delete, getSize, seekForV1OrV11Tag
getIdentifier, getLoggingFilename, setLoggingFilename
isSubsetOf
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
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)
insteadfile
- TagNotFoundException
java.io.IOException
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 separately i.e two TITLE fields in a Vorbis Comment file would count as two
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 void setField(TagField field)
Tag
public java.util.List<TagField> getFields(FieldKey genericKey)
ID3v1Tag
public java.lang.String getFirst(FieldKey genericKey)
ID3v1Tag
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 keypublic boolean isEmpty()
Tag
public void deleteField(FieldKey genericKey)
deleteField
in interface Tag
deleteField
in class ID3v1Tag
genericKey
- public boolean equals(java.lang.Object obj)
public boolean seek(java.nio.ByteBuffer byteBuffer)
public void read(java.nio.ByteBuffer byteBuffer) throws TagNotFoundException
read
in class ID3v1Tag
byteBuffer
- from where to read in a tagTagNotFoundException
- if unable to read a tag in the byteBufferpublic void write(java.io.RandomAccessFile file) throws java.io.IOException
public void createStructure()
ID3v1Tag
createStructure
in class ID3v1Tag
Copyright © 2005-2013 java.net. All Rights Reserved.