|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.generic.AbstractTag
org.jaudiotagger.tag.vorbiscomment.VorbisCommentTag
public class VorbisCommentTag
This is the logical representation of Vorbis Comment Data
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_VENDOR
|
Constructor Summary | |
---|---|
VorbisCommentTag()
|
Method Summary | |
---|---|
void |
add(TagField field)
Add Field |
TagField |
createAlbumField(java.lang.String content)
Creates a field which represents the "album". The field will already contain the given content. |
TagField |
createArtistField(java.lang.String content)
Creates a field which represents the "artist". The field will already contain the given content. |
TagField |
createCommentField(java.lang.String content)
Creates a field which represents the "comment". The field will already contain the given content. |
TagField |
createGenreField(java.lang.String content)
Creates a field which represents the "genre". The field will already contain the given content. |
TagField |
createTagField(java.lang.String vorbisCommentFieldKey,
java.lang.String value)
Create Tag Field using ogg key This method is provided to allow you to create key of any value because VorbisComment allows arbitary keys. |
TagField |
createTagField(TagFieldKey genericKey,
java.lang.String value)
Create Tag Field using generic key |
TagField |
createTagField(VorbisCommentFieldKey vorbisCommentFieldKey,
java.lang.String value)
Create Tag Field using ogg key |
TagField |
createTitleField(java.lang.String content)
Creates a field which represents the "title". The field will already contain the given content. |
TagField |
createTrackField(java.lang.String content)
Creates a field which represents the "track". The field will already contain the given content. |
TagField |
createYearField(java.lang.String content)
Creates a field which represents the "year". The field will already contain the given content. |
void |
deleteTagField(TagFieldKey genericKey)
Delete fields with this generic key |
void |
deleteTagField(VorbisCommentFieldKey vorbisCommentFieldKey)
Delete fields with this vorbisCommentFieldKey |
java.util.List<TagField> |
get(TagFieldKey genericKey)
Maps the generic key to the ogg key and return the list of values for this field |
java.util.List<TagField> |
get(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
byte[] |
getArtworkBinaryData()
Retrieve artwork raw data |
java.lang.String |
getArtworkMimeType()
|
java.lang.String |
getFirst(TagFieldKey genericKey)
Retrieve the first value that exists for this generic key |
java.lang.String |
getFirst(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
java.lang.String |
getVendor()
|
boolean |
isEmpty()
Is this tag empty |
void |
setArtworkField(byte[] data,
java.lang.String mimeType)
Create artwork field |
void |
setVendor(java.lang.String vendor)
Set the vendor, known as the encoder generally We dont want this to be blank, when written to file this field is written to a different location to all other fields but user of library can just reat it as another field |
java.lang.String |
toString()
(overridden) |
Methods inherited from class org.jaudiotagger.audio.generic.AbstractTag |
---|
addAlbum, addArtist, addComment, addGenre, addTitle, addTrack, addYear, get, getAlbum, getArtist, getComment, getFieldCount, getFields, getFirst, getFirstAlbum, getFirstArtist, getFirstComment, getFirstField, getFirstGenre, getFirstTitle, getFirstTrack, getFirstYear, getGenre, getTitle, getTrack, getYear, hasCommonFields, hasField, set, setAlbum, setArtist, setComment, setEncoding, setGenre, setTitle, setTrack, setYear |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_VENDOR
Constructor Detail |
---|
public VorbisCommentTag()
Method Detail |
---|
public TagField createAlbumField(java.lang.String content)
AbstractTag
createAlbumField
in class AbstractTag
content
- The content of the created field.
public TagField createArtistField(java.lang.String content)
AbstractTag
createArtistField
in class AbstractTag
content
- The content of the created field.
public TagField createCommentField(java.lang.String content)
AbstractTag
createCommentField
in class AbstractTag
content
- The content of the created field.
public TagField createGenreField(java.lang.String content)
AbstractTag
createGenreField
in class AbstractTag
content
- The content of the created field.
public TagField createTitleField(java.lang.String content)
AbstractTag
createTitleField
in class AbstractTag
content
- The content of the created field.
public TagField createTrackField(java.lang.String content)
AbstractTag
createTrackField
in class AbstractTag
content
- The content of the created field.
public TagField createYearField(java.lang.String content)
AbstractTag
createYearField
in class AbstractTag
content
- The content of the created field.
public java.lang.String getVendor()
public void setVendor(java.lang.String vendor)
vendor
- public java.lang.String toString()
AbstractTag
toString
in interface Tag
toString
in class AbstractTag
Object.toString()
public TagField createTagField(TagFieldKey genericKey, java.lang.String value) throws KeyNotFoundException
createTagField
in interface Tag
createTagField
in class AbstractTag
genericKey
- is the generic keyvalue
- to store
KeyNotFoundException
public TagField createTagField(VorbisCommentFieldKey vorbisCommentFieldKey, java.lang.String value) throws KeyNotFoundException
vorbisCommentFieldKey
- value
-
KeyNotFoundException
public TagField createTagField(java.lang.String vorbisCommentFieldKey, java.lang.String value)
vorbisCommentFieldKey
- value
-
public java.util.List<TagField> get(TagFieldKey genericKey) throws KeyNotFoundException
get
in interface Tag
get
in class AbstractTag
genericKey
-
TagField
objects with the given "id".
KeyNotFoundException
public java.util.List<TagField> get(VorbisCommentFieldKey vorbisCommentKey) throws KeyNotFoundException
vorbisCommentKey
-
KeyNotFoundException
public java.lang.String getFirst(TagFieldKey genericKey) throws KeyNotFoundException
getFirst
in interface Tag
getFirst
in class AbstractTag
genericKey
-
KeyNotFoundException
public java.lang.String getFirst(VorbisCommentFieldKey vorbisCommentKey) throws KeyNotFoundException
vorbisCommentKey
-
KeyNotFoundException
public void deleteTagField(TagFieldKey genericKey) throws KeyNotFoundException
deleteTagField
in interface Tag
deleteTagField
in class AbstractTag
genericKey
-
KeyNotFoundException
public void deleteTagField(VorbisCommentFieldKey vorbisCommentFieldKey) throws KeyNotFoundException
vorbisCommentFieldKey
-
KeyNotFoundException
public void setArtworkField(byte[] data, java.lang.String mimeType)
Actually create two fields , the dat field and the mimetype
data
- raw image datamimeType
- mimeType of data
TODO could possibly work out mimetype from data, but unlike mp4 there is nothing to restrict to only png
or jpeg imagespublic byte[] getArtworkBinaryData()
public java.lang.String getArtworkMimeType()
public boolean isEmpty()
Overridden because check for size of one because there is always a vendor tag unless just created an empty vorbis tag as part of flac tag in which case size could be zero
isEmpty
in interface Tag
isEmpty
in class AbstractTag
true
if tag contains no field.Tag.isEmpty()
public void add(TagField field)
Overidden because there can only be one vendor set
add
in interface Tag
add
in class AbstractTag
field
-
Changed so add empty fields
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |