public class Mp4TagReverseDnsField extends Mp4TagField implements TagTextField
Originally only used by Itunes for information that was iTunes specific but now used in a wide range of uses, for example Musicbrainz uses it for many of its fields.
These fields have a more complex setup Box ---- shows this is a reverse dns metadata field Box mean the issuer in the form of reverse DNS domain (e.g com.apple.iTunes) Box name descriptor identifying the type of contents Box data contents The raw data passed starts from the mean boxModifier and Type | Field and Description |
---|---|
protected java.lang.String |
content |
protected int |
dataSize |
private java.lang.String |
descriptor |
static java.lang.String |
IDENTIFIER |
private java.lang.String |
issuer |
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagReverseDnsField(Mp4BoxHeader parentHeader,
java.nio.ByteBuffer data)
Construct from existing file data
|
Mp4TagReverseDnsField(Mp4FieldKey id,
java.lang.String content)
Newly created Reverse Dns field
|
Mp4TagReverseDnsField(java.lang.String fieldName,
java.lang.String issuer,
java.lang.String identifier,
java.lang.String content)
Newly created Reverse Dns field bypassing the Mp4TagField enum for creation of temporary reverse dns fields
|
Modifier and Type | Method and Description |
---|---|
protected 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.
|
void |
copyContent(TagField field)
This method copies the data of the given field to the current data.
|
java.lang.String |
getContent()
Returns the content of the field.
|
protected byte[] |
getDataBytes() |
java.lang.String |
getDescriptor() |
java.lang.String |
getEncoding()
Returns the current used charset encoding.
|
Mp4FieldType |
getFieldType() |
java.lang.String |
getIssuer() |
byte[] |
getRawContent()
Convert back to raw content, includes ----,mean,name and data atom as views as one thing externally
|
byte[] |
getRawContentDataOnly()
Get raw content for the data component only
|
boolean |
isBinary()
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 . |
boolean |
isEmpty()
Determines whether the content of the field is empty.
|
void |
setContent(java.lang.String s)
Sets the content of the field.
|
void |
setDescriptor(java.lang.String descriptor)
Set the descriptor for the data (what type of data it is)
|
void |
setEncoding(java.lang.String s)
Sets the charset encoding used by the field.
|
void |
setIssuer(java.lang.String issuer)
Set the issuer, usually reverse dns of the Companies domain
|
java.lang.String |
toString()
This method returns a human readable description of the fields contents.
For text fields it should be the text itself. |
getId, getIdBytes, isBinary, isCommon
public static final java.lang.String IDENTIFIER
protected int dataSize
private java.lang.String issuer
private java.lang.String descriptor
protected java.lang.String content
public Mp4TagReverseDnsField(Mp4BoxHeader parentHeader, java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
parentHeader
- data
- java.io.UnsupportedEncodingException
public Mp4TagReverseDnsField(Mp4FieldKey id, java.lang.String content)
id
- content
- public Mp4TagReverseDnsField(java.lang.String fieldName, java.lang.String issuer, java.lang.String identifier, java.lang.String content)
fieldName
- issuer
- identifier
- content
- public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagField
protected void build(java.nio.ByteBuffer data) throws java.io.UnsupportedEncodingException
Mp4TagField
build
in class Mp4TagField
java.io.UnsupportedEncodingException
public void copyContent(TagField field)
TagField
copyContent
in interface TagField
field
- The field containing the data to be taken.public java.lang.String getContent()
TagTextField
getContent
in interface TagTextField
protected byte[] getDataBytes() throws java.io.UnsupportedEncodingException
getDataBytes
in class Mp4TagField
java.io.UnsupportedEncodingException
public java.lang.String getEncoding()
TagTextField
getEncoding
in interface TagTextField
public byte[] getRawContent() throws java.io.UnsupportedEncodingException
getRawContent
in interface TagField
getRawContent
in class Mp4TagField
java.io.UnsupportedEncodingException
public byte[] getRawContentDataOnly() throws java.io.UnsupportedEncodingException
Mp4TagField
getRawContentDataOnly
in class Mp4TagField
java.io.UnsupportedEncodingException
public boolean isBinary()
TagField
false
.public boolean isEmpty()
TagField
public void setContent(java.lang.String s)
TagTextField
setContent
in interface TagTextField
s
- fields content.public void setEncoding(java.lang.String s)
TagTextField
setEncoding
in interface TagTextField
s
- charset.public java.lang.String toString()
TagField
public java.lang.String getIssuer()
public java.lang.String getDescriptor()
public void setIssuer(java.lang.String issuer)
issuer
- public void setDescriptor(java.lang.String descriptor)
descriptor
- Copyright © 2005-2013 java.net. All Rights Reserved.