bbc.rd.id3
Class ImageFrame

java.lang.Object
  extended bybbc.rd.id3.ImageFrame
All Implemented Interfaces:
de.vdheide.mp3.ID3v2Frame

public class ImageFrame
extends java.lang.Object
implements de.vdheide.mp3.ID3v2Frame

Class representing an ID3v2 "APIC" frame.

Author:
Chris Newell, BBC R&D.

Field Summary
 
Fields inherited from interface de.vdheide.mp3.ID3v2Frame
ID_INVALID
 
Constructor Summary
ImageFrame()
           
ImageFrame(de.vdheide.mp3.ID3v2Frame frame)
           
ImageFrame(java.lang.String description, int type, java.io.File imageFile)
           
 
Method Summary
 byte[] getBytes()
           
 byte[] getContent()
           
 int getContentLength()
           
 java.lang.String getDescription()
           
 int getEncoding()
           
 java.lang.String getID()
           
 byte[] getImageBytes()
           
 int getLength()
           
 java.lang.String getPath()
           
 int getType()
           
 void setDescription(java.lang.String description)
           
 void setID(java.lang.String frameId)
           
 void setImage(java.io.File imageFile)
          Set the image carried by this ImageFrame.
 void setType(int type)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageFrame

public ImageFrame()

ImageFrame

public ImageFrame(java.lang.String description,
                  int type,
                  java.io.File imageFile)
           throws java.io.IOException

ImageFrame

public ImageFrame(de.vdheide.mp3.ID3v2Frame frame)
Method Detail

getEncoding

public int getEncoding()
Returns:
Returns the encoding.

getDescription

public java.lang.String getDescription()
Returns:
Returns the language code.

getType

public int getType()
Returns:
Returns the type.

getImageBytes

public byte[] getImageBytes()
Returns:
Returns the image bytes.

getContentLength

public int getContentLength()

getLength

public int getLength()
Specified by:
getLength in interface de.vdheide.mp3.ID3v2Frame

getContent

public byte[] getContent()
Specified by:
getContent in interface de.vdheide.mp3.ID3v2Frame

toString

public java.lang.String toString()

getID

public java.lang.String getID()
Specified by:
getID in interface de.vdheide.mp3.ID3v2Frame

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - The description to set.

setImage

public void setImage(java.io.File imageFile)
              throws java.io.IOException
Set the image carried by this ImageFrame.

Parameters:
imageFile - the image file.
Throws:
java.io.IOException

setType

public void setType(int type)
Parameters:
type - The type to set.

getPath

public java.lang.String getPath()
Returns:
the path of the image carried in this frame (if known).

setID

public void setID(java.lang.String frameId)
Specified by:
setID in interface de.vdheide.mp3.ID3v2Frame

getBytes

public byte[] getBytes()
Specified by:
getBytes in interface de.vdheide.mp3.ID3v2Frame


© BBC 2005. All rights reserved.