Sun Java Solaris Communities My SDN Account Join SDN
 
Article

Java Advanced Imaging API Sample Source Install

 
Advanced Imaging API Sample Image File Readers and Writers Installation

 

System Requirements:

  • For Solaris operating environment:
    • Solaris operating environment 2.5.1 or subsequent compatible version
    • Java 2 platform, Standard Edition
      • Java 2 SDK Reference Implementation, v. 1.2 or later
      • Java 2 SDK Solaris Production Release, v. 1.2.1_04 or later
    • At least 1 MB of free disk space.
  • For Microsoft Windows:
    • Windows NT 4.0 or Windows 95 or later
    • Java 2 platform, FCS version (Java 2 SDK, Standard Edition (J2SE SDK) 1.2 FCS) or later
    • At least 1 MB of free disk space.
  • For Linux:
    • Linux RedHat 6.1 or later or equivalent.
    • Java 2 platform, FCS version (J2SE SDK 1.2 FCS) or later
    • At least 1 MB of free disk space.
  •  

    Downloading the Archive Files

    Using your browser, download either the tar.gz file or the .zip file from the download page to the location where you want to temporarily store it .

    Installation Instructions

    The downloaded files are archive files either in a Tar Compressed format or in a Zip format. Unbundle the sample code using the appropriate utility: WinZip, unzip, gunzip, pkunzip, uncompress, or tar.

    • For .zip files:
    C:> unzip jai-1_1_1-src-codec.zip 

    Note: If you're using another tool that doesn't preserve path names by default, be sure to specify that path names be preserved. If you're using pkunzip, specify -d:

    C:> pkunzip -d jai-1_1_1-src-codec.zip

    • For .tar.gz files:

    % gunzip jai-1_1_1-src-codec.tar.gz

    % tar xvf jai-1_1_1-src-codec.tar

    After Java Advanced Imaging Sample Image Readers and Writers Source Code is installed

    Java Advanced Imaging Sample Image Readers and Writers Source Code will be installed with the following files:

    BMPCodec.java
    BMPEncodeParam.java
    BMPImageDecoder.java
    BMPImageEncoder.java
    BugFixes.jar
    ByteArraySeekableStream.java
    ComponentSampleModelJAI.java
    DataBufferDouble.java
    DataBufferFloat.java
    FPXCodec.java
    FPXDecodeParam.java
    FPXImage.java
    FPXImageDecoder.java
    FPXUtils.java
    FileCacheSeekableStream.java
    FileSeekableStream.java
    FloatDoubleColorModel.java
    ForwardSeekableStream.java
    GIFCodec.java
    GIFImageDecoder.java
    ImageCodec.java
    ImageDecodeParam.java
    ImageDecoder.java
    ImageDecoderImpl.java
    ImageEncodeParam.java
    ImageEncoder.java
    ImageEncoderImpl.java
    JPEGCodec.java
    JPEGDecodeParam.java
    JPEGEncodeParam.java
    JPEGImageDecoder.java
    JPEGImageEncoder.java
    JaiI18N.java
    MemoryCacheSeekableStream.java
    PNGCodec.java
    PNGDecodeParam.java
    PNGEncodeParam.java
    PNGImageDecoder.java
    PNGImageEncoder.java
    PNGSuggestedPaletteEntry.java
    PNMCodec.java
    PNMEncodeParam.java
    PNMImageDecoder.java
    PNMImageEncoder.java
    PropertySet.java
    PropertyUtil.java
    RasterFactory.java
    SeekableOutputStream.java
    SeekableStream.java
    SegmentedSeekableStream.java
    SimpleRenderedImage.java
    SingleTileRenderedImage.java
    StreamSegment.java
    StreamSegmentMapper.java
    StructuredStorage.java
    TIFFCodec.java
    TIFFDecodeParam.java
    TIFFDirectory.java
    TIFFEncodeParam.java
    TIFFFaxDecoder.java
    TIFFFaxEncoder.java
    TIFFField.java
    TIFFImage.java
    TIFFImageDecoder.java
    TIFFImageEncoder.java
    TIFFLZWDecoder.java
    properties

    Special note should be taken of the file BugFixes.jar. This jar archive contains fixes for several bugs which were present in the JAI 1.1.1 version of the code. These bugs include the following:
    • Inability to write 4-bit TIFF images.
    • Incorrect TIFF G3_2D and G4 encoding when the image width is not a multiple of 8.
    • Incorrect writing of multiple pages per TIFF file when the output is bilevel and is compressed.
    • Workaround in the TIFF decoder for the case of the value of the TIFF "RowsPerStrip" field exceeding the image height.
    • Index out of bounds exception in reading certain FlashPIX files.
    • Failure to ignore the color space calibration bit in reading FlashPIX files.
    • Index out of bounds errors in SimpleRenderedImage getData(Rectangle) and copyData() methods.
    It is recommended that BugFixes.jar be unpacked and its contents allowed to replace the affected source files.

    Exception Messages

    The error messages set on Exceptions encountered when using the codecs are extracted from the properties file included in the downloaded archive file. When a message is needed this file is located by the method getBundle() in the PropertyUtil class. This method searches for the file first in the CLASSPATH of the ClassLoader which loaded the PropertyUtil class. If the file is not found on the CLASSPATH then it is searched for in the current directory. If it is still not found a stack trace will be printed. This behavior may be altered by modifying PropertyUtil.getBundle(). If this is not modified and the compiled classes are built into a jar file, then the properties file should be included in the jar. The properties file may of course be modified to localize the messages.