net.sf.jasperreports.engine.util
Class JRImageLoader

java.lang.Object
  extended by net.sf.jasperreports.engine.util.JRImageLoader

public class JRImageLoader
extends java.lang.Object

Version:
$Id: JRImageLoader.java 1712 2007-04-30 18:04:51Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static byte CHART_IMAGE
           
static byte CROSSTAB_IMAGE
           
static byte NO_IMAGE
           
static byte SUBREPORT_IMAGE
           
 
Constructor Summary
JRImageLoader()
           
 
Method Summary
static java.awt.Image getImage(byte index)
           
static java.awt.Image loadImage(byte[] bytes)
           
protected static java.awt.Image loadImage(java.lang.String image)
          Loads an image from an specified resource.
static byte[] loadImageDataFromAWTImage(java.awt.image.BufferedImage bi)
          Deprecated. Replaced by loadImageDataFromAWTImage(Image, byte).
static byte[] loadImageDataFromAWTImage(java.awt.Image image)
          Deprecated. Replaced by loadImageDataFromAWTImage(Image, byte).
static byte[] loadImageDataFromAWTImage(java.awt.Image image, byte imageType)
          Encoding the image object using an image encoder that supports the supplied image type.
static byte[] loadImageDataFromFile(java.io.File file)
          Deprecated. Replaced by JRLoader.loadBytes(File).
static byte[] loadImageDataFromInputStream(java.io.InputStream is)
          Deprecated. Replaced by JRLoader.loadBytes(InputStream).
static byte[] loadImageDataFromLocation(java.lang.String location)
          Deprecated. Replaced by JRLoader.loadBytesFromLocation(String).
static byte[] loadImageDataFromLocation(java.lang.String location, java.lang.ClassLoader classLoader)
          Deprecated. Replaced by JRLoader.loadBytesFromLocation(String, ClassLoader).
static byte[] loadImageDataFromLocation(java.lang.String location, java.lang.ClassLoader classLoader, java.net.URLStreamHandlerFactory urlHandlerFactory)
          Deprecated. Replaced by JRLoader.loadBytesFromLocation(String, ClassLoader, URLStreamHandlerFactory).
static byte[] loadImageDataFromURL(java.net.URL url)
          Deprecated. Replaced by JRLoader.loadBytes(URL).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_IMAGE

public static final byte NO_IMAGE
See Also:
Constant Field Values

SUBREPORT_IMAGE

public static final byte SUBREPORT_IMAGE
See Also:
Constant Field Values

CHART_IMAGE

public static final byte CHART_IMAGE
See Also:
Constant Field Values

CROSSTAB_IMAGE

public static final byte CROSSTAB_IMAGE
See Also:
Constant Field Values
Constructor Detail

JRImageLoader

public JRImageLoader()
Method Detail

loadImageDataFromFile

public static byte[] loadImageDataFromFile(java.io.File file)
                                    throws JRException
Deprecated. Replaced by JRLoader.loadBytes(File).

Throws:
JRException

loadImageDataFromURL

public static byte[] loadImageDataFromURL(java.net.URL url)
                                   throws JRException
Deprecated. Replaced by JRLoader.loadBytes(URL).

Throws:
JRException

loadImageDataFromInputStream

public static byte[] loadImageDataFromInputStream(java.io.InputStream is)
                                           throws JRException
Deprecated. Replaced by JRLoader.loadBytes(InputStream).

Throws:
JRException

loadImageDataFromLocation

public static byte[] loadImageDataFromLocation(java.lang.String location)
                                        throws JRException
Deprecated. Replaced by JRLoader.loadBytesFromLocation(String).

Throws:
JRException

loadImageDataFromLocation

public static byte[] loadImageDataFromLocation(java.lang.String location,
                                               java.lang.ClassLoader classLoader)
                                        throws JRException
Deprecated. Replaced by JRLoader.loadBytesFromLocation(String, ClassLoader).

Throws:
JRException

loadImageDataFromLocation

public static byte[] loadImageDataFromLocation(java.lang.String location,
                                               java.lang.ClassLoader classLoader,
                                               java.net.URLStreamHandlerFactory urlHandlerFactory)
                                        throws JRException
Deprecated. Replaced by JRLoader.loadBytesFromLocation(String, ClassLoader, URLStreamHandlerFactory).

Throws:
JRException

loadImageDataFromAWTImage

public static byte[] loadImageDataFromAWTImage(java.awt.Image image,
                                               byte imageType)
                                        throws JRException
Encoding the image object using an image encoder that supports the supplied image type.

Parameters:
image - the java.awt.Image object to encode
imageType - the type of the image as specified by one of the constants defined in the JRRenderable interface
Returns:
the encoded image data
Throws:
JRException

loadImageDataFromAWTImage

public static byte[] loadImageDataFromAWTImage(java.awt.image.BufferedImage bi)
                                        throws JRException
Deprecated. Replaced by loadImageDataFromAWTImage(Image, byte).

Encodes the image object using an image encoder that supports the JRRenderable.IMAGE_TYPE_JPEG image type.

Throws:
JRException

loadImageDataFromAWTImage

public static byte[] loadImageDataFromAWTImage(java.awt.Image image)
                                        throws JRException
Deprecated. Replaced by loadImageDataFromAWTImage(Image, byte).

Encodes the image object using an image encoder that supports the JRRenderable.IMAGE_TYPE_JPEG image type.

Throws:
JRException

getImage

public static java.awt.Image getImage(byte index)
                               throws JRException
Throws:
JRException

loadImage

public static java.awt.Image loadImage(byte[] bytes)
                                throws JRException
Throws:
JRException

loadImage

protected static java.awt.Image loadImage(java.lang.String image)
                                   throws JRException
Loads an image from an specified resource.

Parameters:
image - the resource name
Throws:
JRException


© 2001-2006 JasperSoft Corporation www.jaspersoft.com