|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.tag.mp4.Mp4TagField
public abstract class Mp4TagField
This abstract class represents a link between piece of data, and how it is stored as an mp4 atom
Note there isnt a one to one correspondance between a tag field and a box because some fields are represented by multiple boxes, for example many of the MusicBrainz fields use the '----' box, which in turn uses one of mean, name and data box. So an instance of a tag field maps to one item of data such as 'Title', but it may have to read multiple boxes to do this. There are various subclasses that represent different types of fields
Field Summary | |
---|---|
protected java.lang.String |
id
|
static java.util.logging.Logger |
logger
|
protected Mp4BoxHeader |
parentHeader
|
Constructor Summary | |
---|---|
protected |
Mp4TagField(java.nio.ByteBuffer data)
Used by subclasses that canot identify their id until after they have been built such as ReverseDnsField |
protected |
Mp4TagField(Mp4BoxHeader parentHeader,
java.nio.ByteBuffer data)
Used by reverese dns when reading from file, so can identify when there is a data atom |
protected |
Mp4TagField(java.lang.String id)
|
protected |
Mp4TagField(java.lang.String id,
java.nio.ByteBuffer data)
|
Method Summary | |
---|---|
protected abstract void |
build(java.nio.ByteBuffer data)
Processes the data and sets the position of the data buffer to just after the end of this fields data ready for processing next field. |
protected abstract byte[] |
getDataBytes()
|
abstract Mp4FieldType |
getFieldType()
|
java.lang.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()
|
byte[] |
getRawContent()
Convert back to raw content, includes parent and data atom as views as one thing externally |
byte[] |
getRawContentDataOnly()
Get raw content for the data component only |
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 implementation 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 org.jaudiotagger.tag.TagField |
---|
copyContent, isBinary, isEmpty, toString |
Field Detail |
---|
public static java.util.logging.Logger logger
protected java.lang.String id
protected Mp4BoxHeader parentHeader
Constructor Detail |
---|
protected Mp4TagField(java.lang.String id)
protected Mp4TagField(java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
data
-
java.io.UnsupportedEncodingException
protected Mp4TagField(Mp4BoxHeader parentHeader, java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
parentHeader
- data
-
java.io.UnsupportedEncodingException
protected Mp4TagField(java.lang.String id, java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
Method Detail |
---|
public java.lang.String getId()
TagField
AbstractTag
will use the "id" to summarize multiple
fields.
getId
in interface TagField
public void isBinary(boolean b)
TagField
isBinary
in interface TagField
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 boolean isCommon()
TagField
isCommon
in interface TagField
true
if the field is of common use.protected byte[] getIdBytes()
protected abstract byte[] getDataBytes() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
public abstract Mp4FieldType getFieldType()
protected abstract void build(java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
data
-
java.io.UnsupportedEncodingException
public byte[] getRawContent() throws java.io.UnsupportedEncodingException
getRawContent
in interface TagField
java.io.UnsupportedEncodingException
public byte[] getRawContentDataOnly() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |