public class FrameBodyAPIC extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
<Header for 'Attached picture', ID: "APIC"> | |
Text encoding | $xx |
MIME type | <text string> $00 |
Picture type | $xx |
Description | <text string according to encoding> $00 (00) |
Picture data | <binary data> |
Picture type: | $00 | Other |
$01 | 32x32 pixels 'file icon' (PNG only) | |
$02 | Other file icon | |
$03 | Cover (front) | |
$04 | Cover (back) | |
$05 | Leaflet page | |
$06 | Media (e.g. lable side of CD) | |
$07 | Lead artist/lead performer/soloist | |
$08 | Artist/performer | |
$09 | Conductor | |
$0A | Band/Orchestra | |
$0B | Composer | |
$0C | Lyricist/text writer | |
$0D | Recording Location | |
$0E | During recording | |
$0F | During performance | |
$10 | Movie/video screen capture | |
$11 | A bright coloured fish | |
$12 | Illustration | |
$13 | Band/artist logotype | |
$14 | Publisher/Studio logotype |
For more details, please refer to the ID3 specifications:
Modifier and Type | Field and Description |
---|---|
static String |
IMAGE_IS_URL |
TYPE_BODY
objectList
logger
Constructor and Description |
---|
FrameBodyAPIC()
Creates a new FrameBodyAPIC datatype.
|
FrameBodyAPIC(ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodyAPIC datatype.
|
FrameBodyAPIC(byte textEncoding,
String mimeType,
byte pictureType,
String description,
byte[] data)
Creates a new FrameBodyAPIC datatype.
|
FrameBodyAPIC(FrameBodyAPIC body) |
FrameBodyAPIC(FrameBodyPIC body)
Conversion from v2 PIC to v3/v4 APIC
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Get a description of the image
|
String |
getIdentifier()
The ID3v2 frame identifier
|
byte[] |
getImageData()
Get Image data
|
String |
getImageUrl() |
String |
getMimeType()
Get mimetype
|
int |
getPictureType() |
String |
getUserFriendlyValue() |
boolean |
isImageUrl() |
void |
setDescription(String description)
Set a description of the image
|
void |
setImageData(byte[] imageData)
Set imageData
|
void |
setMimeType(String mimeType)
Set mimeType
|
void |
setPictureType(byte pictureType)
Set Picture Type
|
protected void |
setupObjectList()
Create the list of Datatypes that this body
expects in the correct order This method needs to be implemented by concrete subclasses
|
void |
write(ByteArrayOutputStream tagBuffer)
If the description cannot be encoded using current encoder, change the encoder
|
createStructure, equals, getSize, read, setSize, setSize
getBriefDescription, getHeader, getLongDescription, getObject, getObjectValue, getTextEncoding, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString
public static final String IMAGE_IS_URL
public FrameBodyAPIC()
public FrameBodyAPIC(FrameBodyAPIC body)
public FrameBodyAPIC(FrameBodyPIC body)
body
- public FrameBodyAPIC(byte textEncoding, String mimeType, byte pictureType, String description, byte[] data)
textEncoding
- mimeType
- pictureType
- description
- data
- public FrameBodyAPIC(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
- InvalidTagException
- if unable to create framebody from bufferpublic String getUserFriendlyValue()
getUserFriendlyValue
in class AbstractTagFrameBody
public void setDescription(String description)
description
- public String getDescription()
public void setMimeType(String mimeType)
mimeType
- public String getMimeType()
public void setImageData(byte[] imageData)
imageData
- public byte[] getImageData()
public void setPictureType(byte pictureType)
pictureType
- public int getPictureType()
public String getIdentifier()
getIdentifier
in class AbstractID3v2FrameBody
public void write(ByteArrayOutputStream tagBuffer)
write
in class AbstractID3v2FrameBody
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
public boolean isImageUrl()
public String getImageUrl()
Copyright © 2005–2020 jthink.net. All rights reserved.