org.farng.mp3.id3
Class FrameBodyPIC

java.lang.Object
  extended byorg.farng.mp3.AbstractMP3FileItem
      extended byorg.farng.mp3.AbstractMP3FragmentBody
          extended byorg.farng.mp3.id3.AbstractID3v2FrameBody
              extended byorg.farng.mp3.id3.FrameBodyPIC

public class FrameBodyPIC
extends AbstractID3v2FrameBody

4.15. Attached picture

This frame contains a picture directly related to the audio file. Image format is preferably "PNG" or "JPG". Since JPG has the best lossy compression and PNG the best lossless compression and both are free I don't see much room for other formats. I didn't want to forbid other formats though, since there might pop up better ones in the future. Some people will probably think it is neat with ICO pictures as well. 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 content 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 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

Version:
$Revision: 1.4 $
Author:
Eric Farng

Constructor Summary
FrameBodyPIC()
          Creates a new FrameBodyPIC object.
FrameBodyPIC(byte textEncoding, java.lang.String imageFormat, byte pictureType, java.lang.String description, byte[] data)
          Creates a new FrameBodyPIC object.
FrameBodyPIC(FrameBodyPIC body)
          Creates a new FrameBodyPIC object.
FrameBodyPIC(java.io.RandomAccessFile file)
          Creates a new FrameBodyPIC object.
 
Method Summary
 java.lang.String getDescription()
          This method calls toString for all it's objects and appends them.
 java.lang.String getIdentifier()
          ID string that usually corresponds to the class name, but can be displayed to the user.
 void setDescription(java.lang.String description)
           
protected  void setupObjectList()
          Create the order of MP3Object objects that this body expects.
 
Methods inherited from class org.farng.mp3.id3.AbstractID3v2FrameBody
equals, readHeader, writeHeader
 
Methods inherited from class org.farng.mp3.AbstractMP3FragmentBody
appendToObjectList, getBriefDescription, getObject, getObjectListIterator, getSize, has6ByteHeader, isSubsetOf, iterator, read, setObject, toString, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameBodyPIC

public FrameBodyPIC()
Creates a new FrameBodyPIC object.


FrameBodyPIC

public FrameBodyPIC(FrameBodyPIC body)
Creates a new FrameBodyPIC object.


FrameBodyPIC

public FrameBodyPIC(byte textEncoding,
                    java.lang.String imageFormat,
                    byte pictureType,
                    java.lang.String description,
                    byte[] data)
Creates a new FrameBodyPIC object.


FrameBodyPIC

public FrameBodyPIC(java.io.RandomAccessFile file)
             throws java.io.IOException,
                    InvalidTagException
Creates a new FrameBodyPIC object.

Method Detail

setDescription

public void setDescription(java.lang.String description)

getDescription

public java.lang.String getDescription()
Description copied from class: AbstractMP3FragmentBody
This method calls toString for all it's objects and appends them. It contains new line characters and is more suited for display purposes

Overrides:
getDescription in class AbstractMP3FragmentBody
Returns:
formatted description string

getIdentifier

public java.lang.String getIdentifier()
Description copied from class: AbstractMP3FileItem
ID string that usually corresponds to the class name, but can be displayed to the user. It is not indended to identify each individual instance.

Specified by:
getIdentifier in class AbstractMP3FileItem
Returns:
ID string

setupObjectList

protected void setupObjectList()
Description copied from class: AbstractMP3FragmentBody
Create the order of MP3Object objects that this body expects. This method needs to be overwritten.

Specified by:
setupObjectList in class AbstractMP3FragmentBody


Copyright (c) 2004 Eric Farng