|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.tag.mp4.Mp4TagField org.jaudiotagger.tag.mp4.field.Mp4TagBinaryField org.jaudiotagger.tag.mp4.field.Mp4TagCoverField
public class Mp4TagCoverField
Represents Cover Art
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.
Field Summary | |
---|---|
private int |
dataAndHeaderSize
|
private Mp4FieldType |
imageType
|
Fields inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagBinaryField |
---|
dataBytes, dataSize, isBinary |
Fields inherited from class org.jaudiotagger.tag.mp4.Mp4TagField |
---|
id, logger, parentHeader |
Constructor Summary | |
---|---|
Mp4TagCoverField()
Empty CoverArt Field |
|
Mp4TagCoverField(byte[] data)
Construct new cover art with binarydata provided Identifies the imageType by looking at the data |
|
Mp4TagCoverField(java.nio.ByteBuffer raw,
Mp4FieldType imageType)
Construct CoverField by reading data from audio file |
Method Summary | |
---|---|
protected void |
build(java.nio.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 java.lang.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 . |
java.lang.String |
toString()
This method returns a human readable description of the fields contents. For text fields it should be the text itself. |
Methods inherited from class org.jaudiotagger.tag.mp4.field.Mp4TagBinaryField |
---|
copyContent, getData, getDataBytes, getDataSize, isEmpty, setData |
Methods inherited from class org.jaudiotagger.tag.mp4.Mp4TagField |
---|
getId, getIdBytes, getRawContent, getRawContentDataOnly, isBinary, isCommon |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Mp4FieldType imageType
private int dataAndHeaderSize
Constructor Detail |
---|
public Mp4TagCoverField()
public Mp4TagCoverField(java.nio.ByteBuffer raw, Mp4FieldType imageType) throws java.io.UnsupportedEncodingException
raw
- imageType
-
java.io.UnsupportedEncodingException
public Mp4TagCoverField(byte[] data)
data
-
java.io.UnsupportedEncodingException
Method Detail |
---|
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 java.lang.String toString()
TagField
toString
in interface TagField
toString
in class java.lang.Object
protected void build(java.nio.ByteBuffer raw)
Mp4TagField
build
in class Mp4TagBinaryField
public static java.lang.String getMimeTypeForImageType(Mp4FieldType imageType)
imageType
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |