Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.content.loader.bulk
Class ImageLoaderFilter

    java.lang.Object
      com.bea.content.loader.bulk.ImageLoaderFilter

All Implemented Interfaces
  LoaderFilter

Deprecated

    public class ImageLoaderFilter

extends Object
implements LoaderFilter

BulkLoader filter which can determine "width" and "height" metadata for GIF, JPEG, XBM, and PNG image files.

The image type is determined from the file name (based upon the `MIME type`).

This class will generally not read in the entire contents of the file. It will instead attempt to get the metadata from the image format headers. However, it does not implement full decoders for the image formats, so, there might be images files for which this doesn't work.

Since:
  3.1

Constructor Summary
`ImageLoaderFilter()` Deprecated

Method Summary
`static void` | `handleGIF(File f, Properties p, BulkLoader loader)` Deprecated Get the metadata for a GIF file.
`static void` | `handleJPEG(File f, Properties p, BulkLoader loader)` Deprecated Get the metadata for a JPEG file.
`static void` | `handlePNG(File f, Properties p, BulkLoader loader)` Deprecated Get the metadata for a PNG file.
`static void` | `handleXBM(File f, Properties p, BulkLoader loader)` Deprecated Get the metadata for a XBM file.
`void` | `loadProperties(File f, Properties p, BulkLoader loader)` Deprecated Fill out the properties with image metadata from the specified file.
`static void` | `main(String[] args)` Deprecated Print the sizes of the files specified on the command-line.
`static int` | `toInt(byte b)` Deprecated Safely convert a byte to an int (with high bytes set to 0).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ImageLoaderFilter

    public ImageLoaderFilter()

  Deprecated

Method Detail

### loadProperties

    public void loadProperties(File f,
                               Properties p,
                               BulkLoader loader)

  Deprecated
  Fill out the properties with image metadata from the specified file.

  If the filename doesn't correspond to a GIF, JPEG, XBM, or PNG, it will be ignored.

  Specified by:
    `loadProperties` in interface `LoaderFilter`

### toInt

    public static int toInt(byte b)

  Deprecated
  Safely convert a byte to an int (with high bytes set to 0).

### handleGIF

    public static void handleGIF(File f,
                                 Properties p,
                                 BulkLoader loader)
                          throws IOException

  Deprecated
  Get the metadata for a GIF file.

  This will get "width" and "height".

  This only supports standard GIF89a and GIF87a formats where the size is encoded in bytes 6-9 (i.e. after the 'GIF89a' header).

  Throws
    `IOException`

### handleJPEG

    public static void handleJPEG(File f,
                                  Properties p,
                                  BulkLoader loader)
                           throws IOException

  Deprecated
  Get the metadata for a JPEG file.

  This will get "width" and "height".

  This gets the size from the Start of Frame for Baseline DCT section (designated by the 0xff 0xc0 marker).

  Throws
    `IOException`

### handleXBM

    public static void handleXBM(File f,
                                 Properties p,
                                 BulkLoader loader)
                          throws IOException

  Deprecated
  Get the metadata for a XBM file.

  This will get "width" and "height".

  This uses a regular expression to find the width and height. It will ignore comments, although it won't ignore a width and height which are contained within a comments block.

  Throws
    `IOException`

### handlePNG

    public static void handlePNG(File f,
                                 Properties p,
                                 BulkLoader loader)
                          throws IOException

  Deprecated
  Get the metadata for a PNG file.

  This will get "width" and "height".

  Throws
    `IOException`

### main

    public static void main(String[] args)
                     throws Exception

  Deprecated
  Print the sizes of the files specified on the command-line.

  Throws
    `Exception`

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.