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 |
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 String |
TYPE_TRACK |
album, artist, BYTE_TO_UNSIGNED, comment, genre, GENRE_UNDEFINED, 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, 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(RandomAccessFile file)
Deprecated.
use
ID3v11Tag(RandomAccessFile,String) instead |
ID3v11Tag(RandomAccessFile file,
String loggingFilename)
Creates a new ID3v11 datatype.
|
Modifier and Type | Method and Description |
---|---|
void |
addTrack(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(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
|
List<TagField> |
getFields(FieldKey genericKey)
|
String |
getFirst(FieldKey genericKey)
Retrieve the first value that exists for this generic key
|
String |
getFirstComment()
Get Comment
|
TagField |
getFirstField(String id)
Retrieve the first field that exists for this format specific key
|
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
|
List<TagField> |
getTrack() |
boolean |
isEmpty()
Determines whether the tag has no fields specified.
|
void |
read(ByteBuffer byteBuffer)
Read in a tag from the ByteBuffer
|
boolean |
seek(ByteBuffer byteBuffer)
Find identifier within byteBuffer to indicate that a v11 tag exists within the buffer
|
void |
setComment(String comment)
Set Comment
|
void |
setField(TagField field)
Sets a field in the structure, used internally by the library
|
void |
setTrack(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(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 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
public ID3v11Tag()
public ID3v11Tag(ID3v11Tag copyObject)
public ID3v11Tag(AbstractTag mp3tag)
mp3tag
- UnsupportedOperationException
public ID3v11Tag(RandomAccessFile file, String loggingFilename) throws TagNotFoundException, IOException
file
- loggingFilename
- TagNotFoundException
IOException
public ID3v11Tag(RandomAccessFile file) throws TagNotFoundException, IOException
ID3v11Tag(RandomAccessFile,String)
insteadfile
- TagNotFoundException
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(String comment)
setComment
in class ID3v1Tag
comment
- public String getFirstComment()
getFirstComment
in class ID3v1Tag
public void setTrack(String trackValue)
trackValue
- public String getFirstTrack()
getFirstTrack
in class ID3v1Tag
public void addTrack(String track)
public void setField(TagField field)
Tag
public List<TagField> getFields(FieldKey genericKey)
ID3v1Tag
public String getFirst(FieldKey genericKey)
ID3v1Tag
public TagField getFirstField(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(Object obj)
public boolean seek(ByteBuffer byteBuffer)
public void read(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(RandomAccessFile file) throws IOException
write
in class ID3v1Tag
file
- that this tag should be written toIOException
- thrown if there were problems writing to the filepublic void createStructure()
ID3v1Tag
createStructure
in class ID3v1Tag
Copyright © 2005–2020 jthink.net. All rights reserved.