org.eclipse.birt.report.engine.api
Interface IImage

All Superinterfaces:
IReportPart

public interface IImage
extends IReportPart

Defines an interface to communicate info about an image to image handler


Field Summary
static int CUSTOM_IMAGE
           
static int DESIGN_IMAGE
           
static int FILE_IMAGE
           
static int INVALID_IMAGE
           
static int REPORTDOC_IMAGE
           
static int URL_IMAGE
           
 
Method Summary
 java.lang.String getExtension()
          return the image postfix, such as jpg, png
 java.lang.String getID()
          returns an identifier for the image
 byte[] getImageData()
          returns binary image data.
 java.lang.String getImageMap()
          The image map is used in HTML output.
 java.io.InputStream getImageStream()
          returns an input stream where the mage can be read
 java.lang.String getMimeType()
           
 int getSource()
          returns the source type of the image.
 void writeImage(java.io.File dest)
          write the image to a destination file
 
Methods inherited from interface org.eclipse.birt.report.engine.api.IReportPart
getRenderOption, getReportRunnable
 

Field Detail

DESIGN_IMAGE

public static final int DESIGN_IMAGE
See Also:
Constant Field Values

REPORTDOC_IMAGE

public static final int REPORTDOC_IMAGE
See Also:
Constant Field Values

URL_IMAGE

public static final int URL_IMAGE
See Also:
Constant Field Values

FILE_IMAGE

public static final int FILE_IMAGE
See Also:
Constant Field Values

CUSTOM_IMAGE

public static final int CUSTOM_IMAGE
See Also:
Constant Field Values

INVALID_IMAGE

public static final int INVALID_IMAGE
See Also:
Constant Field Values
Method Detail

getID

public java.lang.String getID()
returns an identifier for the image

Returns:
an identifier for the image.

getSource

public int getSource()
returns the source type of the image. Could be DESIGN_IMAGE, REPORTDOC_IMAGE, URL_IMAGE or CUSTOM_IMAGE

Returns:
the type of the image

getImageData

public byte[] getImageData()
                    throws java.lang.OutOfMemoryError
returns binary image data. The function should be called with caution

Returns:
the binary image data
Throws:
java.lang.OutOfMemoryError

getImageStream

public java.io.InputStream getImageStream()
returns an input stream where the mage can be read

Returns:
an input stream where the image can be read

writeImage

public void writeImage(java.io.File dest)
                throws java.io.IOException
write the image to a destination file

Parameters:
dest - destination file to write the image to
Throws:
java.io.IOException

getExtension

public java.lang.String getExtension()
return the image postfix, such as jpg, png


getMimeType

public java.lang.String getMimeType()
Returns:
the mime type of the image

getImageMap

public java.lang.String getImageMap()
The image map is used in HTML output.

Returns:
the image map associate with this image.


Copyright © 2005 Actuate Corp. All rights reserved.