FileDocCategorySizeDatePackage
TagField.javaAPI DocJaudiotagger 2.0.44545Wed Mar 30 16:12:12 BST 2011org.jaudiotagger.tag

TagField

public interface TagField
Implementing classes represent a tag field for the entagged audio library.
Very basic functionality is defined for use with {@link org.jaudiotagger.tag.Tag}.
author
Rapha�l Slinckx

Fields Summary
Constructors Summary
Methods Summary
public voidcopyContent(org.jaudiotagger.tag.TagField field)
This method copies the data of the given field to the current data.

param
field The field containing the data to be taken.

public java.lang.StringgetId()
Returns the Id of the represented tag field.
This value should uniquely identify a kind of tag data, like title. {@link org.jaudiotagger.audio.generic.AbstractTag} will use the "id" to summarize multiple fields.

return
Unique identifier for the fields type. (title, artist...)

public byte[]getRawContent()
This method delivers the binary representation of the fields data in order to be directly written to the file.

return
Binary data representing the current tag field.
throws
UnsupportedEncodingException Most tag data represents text. In some cases the underlying implementation will need to convert the text data in java to a specific charset encoding. In these cases an {@link UnsupportedEncodingException} may occur.

public booleanisBinary()
Determines whether the represented field contains (is made up of) binary data, instead of text data.
Software can identify fields to be displayed because they are human readable if this method returns false.

return
true if field represents binary data (not human readable).

public voidisBinary(boolean b)
This method will set the field to represent binary data.

Some implementations may support conversions.
As of now (Octobre 2005) there is no implementation really using this method to perform useful operations.

param
b true, if the field contains binary data. //@deprecated As for now is of no use. Implementations should use another // way of setting this property.

public booleanisCommon()
Identifies a field to be of common use.

Some software may differ between common and not common fields. A common one is for sure the title field. A web link may not be of common use for tagging. However some file formats, or future development of users expectations will make more fields common than now can be known.

return
true if the field is of common use.

public booleanisEmpty()
Determines whether the content of the field is empty.

return
true if no data is stored (or empty String).

public java.lang.StringtoString()
This method returns a human readable description of the fields contents.
For text fields it should be the text itself. Other fields containing images may return a formatted string with image properties like width, height and so on.

return
Description of the fields content.