public class FrameBodyPIC extends AbstractID3v2FrameBody implements ID3v22FrameBody
This frame contains a picture directly related to the audio file. Image format is preferably "PNG" [PNG] or "JPG" [JFIF]. Description is a short description of the picture, represented as a terminated textstring. The description has a maximum length of 64 characters, but may be empty. There may be several pictures attached to one file, each in their individual "PIC" frame, but only one with the same ontent descriptor. There may only be one picture with the picture type declared as picture type $01 and $02 respectively. There is a possibility to put only a link to the image file by using the image format' "--" and having a complete URL [URL] instead of picture data. The use of linked files should however be used restrictively since there is the risk of separation of files. Attached picture "PIC" Frame size $xx xx xx Text encoding $xx Image format $xx xx xx Picture type $xx Description textstring $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
Modifier and Type | Field and Description |
---|---|
static String |
IMAGE_IS_URL |
TYPE_BODY
objectList
logger
Constructor and Description |
---|
FrameBodyPIC()
Creates a new FrameBodyPIC datatype.
|
FrameBodyPIC(ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodyPIC datatype.
|
FrameBodyPIC(byte textEncoding,
String imageFormat,
byte pictureType,
String description,
byte[] data)
Creates a new FrameBodyPIC datatype.
|
FrameBodyPIC(FrameBodyAPIC body)
Conversion from v2 PIC to v3/v4 APIC
|
FrameBodyPIC(FrameBodyPIC body) |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Get a description of the image
|
String |
getFormatType()
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() |
boolean |
isImageUrl() |
void |
setDescription(String description)
Set a description of the image
|
void |
setImageData(byte[] imageData)
Set imageData
|
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, getUserFriendlyValue, isSubsetOf, iterator, setHeader, setObjectValue, setTextEncoding, toString
public static final String IMAGE_IS_URL
public FrameBodyPIC()
public FrameBodyPIC(FrameBodyPIC body)
public FrameBodyPIC(byte textEncoding, String imageFormat, byte pictureType, String description, byte[] data)
textEncoding
- imageFormat
- pictureType
- description
- data
- public FrameBodyPIC(FrameBodyAPIC body)
body
- public FrameBodyPIC(ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
- InvalidTagException
- if unable to create framebody from bufferpublic void setDescription(String description)
description
- of the imagepublic String getDescription()
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
public String getFormatType()
public boolean isImageUrl()
public String getMimeType()
public String getImageUrl()
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
Copyright © 2005–2020 jthink.net. All rights reserved.