Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.jasperreports.engine.util
Class JRImageLoader

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

    public final class JRImageLoader

extends java.lang.Object

Version:
  $Id: JRImageLoader.java 3939 2010-08-20 09:52:00Z teodord $
Author:
  Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
`static byte` | `CHART_IMAGE` Deprecated. Replaced by `CHART_IMAGE_RESOURCE`.
`static java.lang.String` | `CHART_IMAGE_RESOURCE`
`static java.lang.String` | `COMPONENT_IMAGE_RESOURCE`
`static byte` | `CROSSTAB_IMAGE` Deprecated. Replaced by `CROSSTAB_IMAGE_RESOURCE`.
`static java.lang.String` | `CROSSTAB_IMAGE_RESOURCE`
`static byte` | `NO_IMAGE` Deprecated. Replaced by `NO_IMAGE_RESOURCE`.
`static java.lang.String` | `NO_IMAGE_RESOURCE`
`static java.lang.String` | `PROPERTY_IMAGE_ENCODER` Configuration property specifying the name of the class implementing the `JRImageEncoder` interface to be used by the engine.
`static java.lang.String` | `PROPERTY_IMAGE_READER` Configuration property specifying the name of the class implementing the `JRImageReader` interface to be used by the engine.
`static byte` | `SUBREPORT_IMAGE` Deprecated. Replaced by `SUBREPORT_IMAGE_RESOURCE`.
`static java.lang.String` | `SUBREPORT_IMAGE_RESOURCE`

Method Summary
`static java.awt.Image` | `getImage(byte index)` Deprecated. To be removed in future releases.
`static java.awt.Image` | `loadImage(byte[] bytes)`
`protected static java.awt.Image` | `loadImage(java.lang.String image)` Deprecated. To be removed in future releases.
`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

### PROPERTY_IMAGE_READER

    public static final java.lang.String PROPERTY_IMAGE_READER

  Configuration property specifying the name of the class implementing the `JRImageReader` interface to be used by the engine. If not set, the engine will try to an image reader implementation that corresponds to the JVM version.

  See Also:
    Constant Field Values

### PROPERTY_IMAGE_ENCODER

    public static final java.lang.String PROPERTY_IMAGE_ENCODER

  Configuration property specifying the name of the class implementing the `JRImageEncoder` interface to be used by the engine. If not set, the engine will try to an image encoder implementation that corresponds to the JVM version.

  See Also:
    Constant Field Values

### NO_IMAGE

    public static final byte NO_IMAGE

  Deprecated. Replaced by `NO_IMAGE_RESOURCE`.
  See Also:
    Constant Field Values

### SUBREPORT_IMAGE

    public static final byte SUBREPORT_IMAGE

  Deprecated. Replaced by `SUBREPORT_IMAGE_RESOURCE`.
  See Also:
    Constant Field Values

### CHART_IMAGE

    public static final byte CHART_IMAGE

  Deprecated. Replaced by `CHART_IMAGE_RESOURCE`.
  See Also:
    Constant Field Values

### CROSSTAB_IMAGE

    public static final byte CROSSTAB_IMAGE

  Deprecated. Replaced by `CROSSTAB_IMAGE_RESOURCE`.
  See Also:
    Constant Field Values

### NO_IMAGE_RESOURCE

    public static final java.lang.String NO_IMAGE_RESOURCE

See Also:
  Constant Field Values

### SUBREPORT_IMAGE_RESOURCE

    public static final java.lang.String SUBREPORT_IMAGE_RESOURCE

See Also:
  Constant Field Values

### CHART_IMAGE_RESOURCE

    public static final java.lang.String CHART_IMAGE_RESOURCE

See Also:
  Constant Field Values

### CROSSTAB_IMAGE_RESOURCE

    public static final java.lang.String CROSSTAB_IMAGE_RESOURCE

See Also:
  Constant Field Values

### COMPONENT_IMAGE_RESOURCE

    public static final java.lang.String COMPONENT_IMAGE_RESOURCE

See Also:
  Constant Field Values

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

  Deprecated. To be removed in future releases.

  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

  Deprecated. To be removed in future releases.

  Loads an image from an specified resource.

  Parameters:
    `image` - the resource name
  Throws:
    `JRException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com