public class Mp4TagCoverField extends Mp4TagBinaryField
Note:Within this library we have a seperate TagCoverField for every image stored, however this does not map very directly to how they are physically stored within a file, because all are stored under a single covr atom, so a more complex conversion has to be done then for other fields when writing multiple images back to file.
dataBytes, dataSize, isBinary
id, logger, parentHeader
Constructor and Description |
---|
Mp4TagCoverField()
Empty CoverArt Field
|
Mp4TagCoverField(byte[] data)
Construct new cover art with binarydata provided
Identifies the imageType by looking at the data
|
Mp4TagCoverField(ByteBuffer raw,
Mp4FieldType imageType)
Construct CoverField by reading data from audio file
|
Modifier and Type | Method and Description |
---|---|
protected void |
build(ByteBuffer raw)
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.
|
int |
getDataAndHeaderSize() |
Mp4FieldType |
getFieldType()
Return field type, for artwork this also identifies the imagetype
|
static String |
getMimeTypeForImageType(Mp4FieldType imageType) |
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 . |
String |
toString()
This method returns a human readable description of the fields contents.
For text fields it should be the text itself. |
copyContent, getData, getDataBytes, getDataSize, isEmpty, setData
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon
public Mp4TagCoverField()
public Mp4TagCoverField(ByteBuffer raw, Mp4FieldType imageType) throws UnsupportedEncodingException
raw
- imageType
- UnsupportedEncodingException
public Mp4TagCoverField(byte[] data)
data
- UnsupportedEncodingException
public int getDataAndHeaderSize()
public Mp4FieldType getFieldType()
getFieldType
in class Mp4TagBinaryField
public boolean isBinary()
TagField
false
.isBinary
in interface TagField
isBinary
in class Mp4TagBinaryField
true
if field represents binary data (not human
readable).public String toString()
TagField
protected void build(ByteBuffer raw)
Mp4TagField
build
in class Mp4TagBinaryField
public static String getMimeTypeForImageType(Mp4FieldType imageType)
imageType
- Copyright © 2005–2020 jthink.net. All rights reserved.