org.farng.mp3.id3
Class FrameBodyAPIC

java.lang.Object
  extended by org.farng.mp3.AbstractMP3FileItem
      extended by org.farng.mp3.AbstractMP3FragmentBody
          extended by org.farng.mp3.id3.AbstractID3v2FrameBody
              extended by org.farng.mp3.id3.AbstractPictureFrameBody
                  extended by org.farng.mp3.id3.FrameBodyAPIC
All Implemented Interfaces:
MP3MetadataContainer

public class FrameBodyAPIC
extends AbstractPictureFrameBody

4.14.   Attached picture

   This frame contains a picture directly related to the audio file.
   Image format is the MIME type and subtype [MIME] for the image. In
   the event that the MIME media type name is omitted, "image/" will be

   implied. The "image/png" [PNG] or "image/jpeg" [JFIF] picture format
   should be used when interoperability is wanted. Description is a
   short description of the picture, represented as a terminated

   text string. There may be several pictures attached to one file, each
   in their individual "APIC" 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 the

   possibility to put only a link to the image file by using the 'MIME
   type' "-->" and having a complete URL [URL] instead of picture data.
   The use of linked files should however be used sparingly since there
   is the risk of separation of files.

     <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. label 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: 3 $
Author:
Eric Farng

Constructor Summary
FrameBodyAPIC()
          Creates a new FrameBodyAPIC object.
FrameBodyAPIC(byte textEncoding, java.lang.String mimeType, byte pictureType, java.lang.String description, byte[] data)
          Creates a new FrameBodyAPIC object.
FrameBodyAPIC(FrameBodyAPIC body)
          Creates a new FrameBodyAPIC object.
FrameBodyAPIC(java.io.RandomAccessFile file)
          Creates a new FrameBodyAPIC object.
 
Method Summary
protected  AbstractMP3Object createMimeTypeObject()
          Create the appropriate MIME object.
 java.lang.String getIdentifier()
           
 
Methods inherited from class org.farng.mp3.id3.AbstractPictureFrameBody
getDescription, setDescription, setupObjectList
 
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

FrameBodyAPIC

public FrameBodyAPIC()
Creates a new FrameBodyAPIC object.


FrameBodyAPIC

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


FrameBodyAPIC

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


FrameBodyAPIC

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

Throws:
java.io.IOException
InvalidTagException
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Specified by:
getIdentifier in class AbstractMP3FileItem

createMimeTypeObject

protected AbstractMP3Object createMimeTypeObject()
Description copied from class: AbstractPictureFrameBody
Create the appropriate MIME object.

This varies between PIC and APIC.

Specified by:
createMimeTypeObject in class AbstractPictureFrameBody
Returns:
the appropriate AbstractMP3Object