|
|||||||||
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
|
private static java.util.EnumMap<FieldKey,VorbisCommentFieldKey> |
tagFieldToOggField
|
Fields inherited from class org.jaudiotagger.audio.generic.AbstractTag |
---|
commonNumber, fields |
Constructor Summary | |
---|---|
VorbisCommentTag()
Only used within Package, hidden because it doesnt set Vendor which should be done when created by end user |
Method Summary | |
---|---|
void |
addField(Artwork artwork)
Add artwork field |
void |
addField(java.lang.String vorbisCommentKey,
java.lang.String value)
Create and add field with name of vorbisCommentkey |
void |
addField(TagField field)
Add Field |
TagField |
createField(Artwork artwork)
Create Artwork field |
TagField |
createField(FieldKey genericKey,
java.lang.String value)
Create Tag Field using generic key |
TagField |
createField(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 |
createField(VorbisCommentFieldKey vorbisCommentFieldKey,
java.lang.String value)
Create Tag Field using ogg key |
private MetadataBlockDataPicture |
createMetadataBlockDataPicture(Artwork artwork)
Create MetadataBlockPicture field, this is the preferred way of storing artwork in VorbisComment tag now but has to be base encoded to be stored in VorbisComment |
static VorbisCommentTag |
createNewTag()
Use to construct a new tag properly initialized |
void |
deleteArtworkField()
Delete all instance of artwork Field |
void |
deleteField(FieldKey genericKey)
Delete fields with this generic key |
void |
deleteField(VorbisCommentFieldKey vorbisCommentFieldKey)
Delete fields with this vorbisCommentFieldKey |
java.util.List<TagField> |
get(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
byte[] |
getArtworkBinaryData()
Retrieve artwork raw data when using the deprecated COVERART format |
java.util.List<Artwork> |
getArtworkList()
|
java.lang.String |
getArtworkMimeType()
Retrieve artwork mimeType when using deprecated COVERART format |
java.util.List<TagField> |
getFields(FieldKey genericKey)
Maps the generic key to the ogg key and return the list of values for this field |
java.lang.String |
getFirst(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
TagField |
getFirstField(FieldKey genericKey)
|
java.lang.String |
getValue(FieldKey genericKey,
int index)
Retrieve String value of the nth tag field that exists for this generic key |
java.lang.String |
getVendor()
|
protected boolean |
isAllowedEncoding(java.lang.String enc)
Determines whether the given charset encoding may be used for the represented tagging system. |
boolean |
isEmpty()
Is this tag empty |
void |
setArtworkField(byte[] data,
java.lang.String mimeType)
Deprecated. |
void |
setField(Artwork artwork)
Create and set artwork field |
void |
setField(java.lang.String vorbisCommentKey,
java.lang.String value)
Create and set field with name of vorbisCommentkey |
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 |
---|
addField, deleteField, getFieldCount, getFieldCountIncludingSubValues, getFields, getFields, getFirst, getFirst, getFirstArtwork, getFirstField, getItem, getSubValue, hasCommonFields, hasField, setEncoding, setField, setField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static java.util.EnumMap<FieldKey,VorbisCommentFieldKey> tagFieldToOggField
public static final java.lang.String DEFAULT_VENDOR
Constructor Detail |
---|
VorbisCommentTag()
Method Detail |
---|
public static VorbisCommentTag createNewTag()
public java.lang.String getVendor()
public void setVendor(java.lang.String vendor)
vendor
- protected boolean isAllowedEncoding(java.lang.String enc)
AbstractTag
isAllowedEncoding
in class AbstractTag
enc
- charset encoding.
true
if the given encoding can be used.public java.lang.String toString()
AbstractTag
toString
in interface Tag
toString
in class AbstractTag
Object.toString()
public TagField createField(FieldKey genericKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
createField
in interface Tag
createField
in class AbstractTag
genericKey
- is the generic keyvalue
- to store
KeyNotFoundException
FieldDataInvalidException
public TagField createField(VorbisCommentFieldKey vorbisCommentFieldKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
vorbisCommentFieldKey
- value
-
KeyNotFoundException
FieldDataInvalidException
public TagField createField(java.lang.String vorbisCommentFieldKey, java.lang.String value)
vorbisCommentFieldKey
- value
-
public java.util.List<TagField> getFields(FieldKey genericKey) throws KeyNotFoundException
getFields
in interface Tag
getFields
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 getValue(FieldKey genericKey, int index) throws KeyNotFoundException
Tag
KeyNotFoundException
public java.lang.String getFirst(VorbisCommentFieldKey vorbisCommentKey) throws KeyNotFoundException
vorbisCommentKey
-
KeyNotFoundException
public void deleteField(FieldKey genericKey) throws KeyNotFoundException
deleteField
in interface Tag
deleteField
in class AbstractTag
genericKey
-
KeyNotFoundException
public void deleteField(VorbisCommentFieldKey vorbisCommentFieldKey) throws KeyNotFoundException
vorbisCommentFieldKey
-
KeyNotFoundException
public 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 addField(TagField field)
Overidden because there can only be one vendor set
addField
in interface Tag
addField
in class AbstractTag
field
-
Changed so add empty fields
public TagField getFirstField(FieldKey genericKey) throws KeyNotFoundException
getFirstField
in interface Tag
getFirstField
in class AbstractTag
KeyNotFoundException
public java.util.List<Artwork> getArtworkList()
private MetadataBlockDataPicture createMetadataBlockDataPicture(Artwork artwork) throws FieldDataInvalidException
FieldDataInvalidException
public TagField createField(Artwork artwork) throws FieldDataInvalidException
artwork
-
FieldDataInvalidException
public void setField(Artwork artwork) throws FieldDataInvalidException
setField
in interface Tag
setField
in class AbstractTag
FieldDataInvalidException
public void addField(Artwork artwork) throws FieldDataInvalidException
addField
in interface Tag
addField
in class AbstractTag
artwork
-
FieldDataInvalidException
@Deprecated public void setArtworkField(byte[] data, java.lang.String mimeType)
data
- raw image datamimeType
- mimeType of data
public void setField(java.lang.String vorbisCommentKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
vorbisCommentKey
- value
-
KeyNotFoundException
FieldDataInvalidException
public void addField(java.lang.String vorbisCommentKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
vorbisCommentKey
- value
-
KeyNotFoundException
FieldDataInvalidException
public void deleteArtworkField() throws KeyNotFoundException
deleteArtworkField
in interface Tag
deleteArtworkField
in class AbstractTag
KeyNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |