entagged.audioformats.mp4.util
Class Mp4TagField

java.lang.Object
  extended by entagged.audioformats.mp4.util.Mp4TagField
All Implemented Interfaces:
TagField
Direct Known Subclasses:
Mp4TagBinaryField, Mp4TagTextField

public abstract class Mp4TagField
extends Object
implements TagField


Field Summary
protected  String id
           
 
Constructor Summary
Mp4TagField(String id)
           
Mp4TagField(String id, byte[] raw)
           
 
Method Summary
protected abstract  void build(byte[] raw)
           
 String getId()
          Returns the Id of the represented tag field.
This value should uniquely identify a kind of tag data, like title.
protected  byte[] getIdBytes()
           
 void isBinary(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 implemenation really using this method to perform useful operations.
 boolean isCommon()
          Identifies a field to be of common use.
Some software may differ between common and not common fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface entagged.audioformats.generic.TagField
copyContent, getRawContent, isBinary, isEmpty, toString
 

Field Detail

id

protected String id
Constructor Detail

Mp4TagField

public Mp4TagField(String id)

Mp4TagField

public Mp4TagField(String id,
                   byte[] raw)
            throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException
Method Detail

getId

public String getId()
Description copied from interface: TagField
Returns the Id of the represented tag field.
This value should uniquely identify a kind of tag data, like title. AbstractTag will use the "id" to summarize multiple fields.

Specified by:
getId in interface TagField
Returns:
Unique identifier for the fields type. (title, artist...)

isBinary

public void isBinary(boolean b)
Description copied from interface: TagField
This method will set the field to represent binary data.
Some implementations may support conversions.
As of now (Octobre 2005) there is no implemenation really using this method to perform useful operations.

Specified by:
isBinary in interface TagField
Parameters:
b - true, if the field contains binary data.

isCommon

public boolean isCommon()
Description copied from interface: TagField
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 developement of users expectations will make more fields common than now can be known.

Specified by:
isCommon in interface TagField
Returns:
true if the field is of common use.

getIdBytes

protected byte[] getIdBytes()

build

protected abstract void build(byte[] raw)
                       throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException


Copyright © 2007-2008. All Rights Reserved.