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 DescriptionModifier and Type | Field and Description |
---|---|
static java.lang.String |
IMAGE_IS_URL |
TYPE_BODY
objectList
logger
Constructor and Description |
---|
FrameBodyPIC()
Creates a new FrameBodyPIC datatype.
|
FrameBodyPIC(java.nio.ByteBuffer byteBuffer,
int frameSize)
Creates a new FrameBodyPIC datatype.
|
FrameBodyPIC(byte textEncoding,
java.lang.String imageFormat,
byte pictureType,
java.lang.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 |
---|---|
java.lang.String |
getDescription()
Get a description of the image
|
java.lang.String |
getFormatType()
Get a description of the image
|
java.lang.String |
getIdentifier()
The ID3v2 frame identifier
|
byte[] |
getImageData()
Get Image data
|
java.lang.String |
getImageUrl() |
java.lang.String |
getMimeType()
Get mimetype
|
int |
getPictureType() |
boolean |
isImageUrl() |
void |
setDescription(java.lang.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(java.io.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 java.lang.String IMAGE_IS_URL
public FrameBodyPIC()
public FrameBodyPIC(FrameBodyPIC body)
public FrameBodyPIC(byte textEncoding, java.lang.String imageFormat, byte pictureType, java.lang.String description, byte[] data)
textEncoding
- imageFormat
- pictureType
- description
- data
- public FrameBodyPIC(FrameBodyAPIC body)
body
- public FrameBodyPIC(java.nio.ByteBuffer byteBuffer, int frameSize) throws InvalidTagException
byteBuffer
- frameSize
- InvalidTagException
- if unable to create framebody from bufferpublic void setDescription(java.lang.String description)
description
- of the imagepublic java.lang.String getDescription()
public void setImageData(byte[] imageData)
imageData
- public byte[] getImageData()
public void setPictureType(byte pictureType)
pictureType
- public int getPictureType()
public java.lang.String getIdentifier()
getIdentifier
in class AbstractID3v2FrameBody
public void write(java.io.ByteArrayOutputStream tagBuffer)
write
in class AbstractID3v2FrameBody
public java.lang.String getFormatType()
public boolean isImageUrl()
public java.lang.String getMimeType()
public java.lang.String getImageUrl()
protected void setupObjectList()
AbstractTagFrameBody
setupObjectList
in class AbstractTagFrameBody
Copyright © 2005-2013 java.net. All Rights Reserved.