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 box
Modifier and Type | Field and Description |
---|---|
protected String |
content |
protected int |
dataSize |
static String |
IDENTIFIER |
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagReverseDnsField(Mp4BoxHeader parentHeader,
ByteBuffer data)
Construct from existing file data
|
Mp4TagReverseDnsField(Mp4FieldKey id,
String content)
Newly created Reverse Dns field
|
Mp4TagReverseDnsField(String fieldName,
String issuer,
String identifier,
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(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.
|
String |
getContent()
Returns the content of the field.
|
protected byte[] |
getDataBytes() |
String |
getDescriptor() |
Charset |
getEncoding()
Returns the current used charset encoding.
|
Mp4FieldType |
getFieldType() |
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(String s)
Sets the content of the field.
|
void |
setDescriptor(String descriptor)
Set the descriptor for the data (what type of data it is)
|
void |
setEncoding(Charset s)
Sets the charset encoding used by the field.
|
void |
setIssuer(String issuer)
Set the issuer, usually reverse dns of the Companies domain
|
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 String IDENTIFIER
protected int dataSize
protected String content
public Mp4TagReverseDnsField(Mp4BoxHeader parentHeader, ByteBuffer data) throws UnsupportedEncodingException
parentHeader
- data
- UnsupportedEncodingException
public Mp4TagReverseDnsField(Mp4FieldKey id, String content)
id
- content
- public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagField
protected void build(ByteBuffer data) throws UnsupportedEncodingException
Mp4TagField
build
in class Mp4TagField
UnsupportedEncodingException
public void copyContent(TagField field)
TagField
copyContent
in interface TagField
field
- The field containing the data to be taken.public String getContent()
TagTextField
getContent
in interface TagTextField
protected byte[] getDataBytes() throws UnsupportedEncodingException
getDataBytes
in class Mp4TagField
UnsupportedEncodingException
public Charset getEncoding()
TagTextField
getEncoding
in interface TagTextField
public byte[] getRawContent() throws UnsupportedEncodingException
getRawContent
in interface TagField
getRawContent
in class Mp4TagField
UnsupportedEncodingException
public byte[] getRawContentDataOnly() throws UnsupportedEncodingException
Mp4TagField
getRawContentDataOnly
in class Mp4TagField
UnsupportedEncodingException
public boolean isBinary()
TagField
false
.public boolean isEmpty()
TagField
public void setContent(String s)
TagTextField
setContent
in interface TagTextField
s
- fields content.public void setEncoding(Charset s)
TagTextField
setEncoding
in interface TagTextField
s
- charset.public String toString()
TagField
public String getIssuer()
public String getDescriptor()
public void setIssuer(String issuer)
issuer
- public void setDescriptor(String descriptor)
descriptor
- Copyright © 2005–2020 jthink.net. All rights reserved.