org.apache.sanselan.formats.ico
Class IcoImageParser

java.lang.Object
  extended by org.apache.sanselan.common.BinaryFileFunctions
      extended by org.apache.sanselan.common.BinaryFileParser
          extended by org.apache.sanselan.ImageParser
              extended by org.apache.sanselan.formats.ico.IcoImageParser
All Implemented Interfaces:
BinaryConstants, SanselanConstants

public class IcoImageParser
extends ImageParser


Field Summary
 
Fields inherited from class org.apache.sanselan.common.BinaryFileFunctions
debug
 
Fields inherited from interface org.apache.sanselan.SanselanConstants
BUFFERED_IMAGE_FACTORY, PARAM_KEY_COMPRESSION, PARAM_KEY_FILENAME, PARAM_KEY_FORMAT, PARAM_KEY_READ_THUMBNAILS, PARAM_KEY_STRICT, PARAM_KEY_VERBOSE, PARAM_KEY_XMP_XML
 
Fields inherited from interface org.apache.sanselan.common.BinaryConstants
BYTE_ORDER_BIG_ENDIAN, BYTE_ORDER_INTEL, BYTE_ORDER_LEAST_SIGNIFICANT_BYTE, BYTE_ORDER_LITTLE_ENDIAN, BYTE_ORDER_LSB, BYTE_ORDER_MOST_SIGNIFICANT_BYTE, BYTE_ORDER_MOTOROLA, BYTE_ORDER_MSB, BYTE_ORDER_NETWORK
 
Constructor Summary
IcoImageParser()
           
 
Method Summary
 boolean embedICCProfile(java.io.File src, java.io.File dst, byte[] profile)
           
protected  java.lang.String[] getAcceptedExtensions()
           
protected  ImageFormat[] getAcceptedTypes()
           
 java.util.ArrayList getAllBufferedImages(ByteSource byteSource)
           
 java.awt.image.BufferedImage getBufferedImage(ByteSource byteSource, java.util.Map params)
           
 java.lang.String getDefaultExtension()
           
 byte[] getICCProfileBytes(ByteSource byteSource, java.util.Map params)
           
 ImageInfo getImageInfo(ByteSource byteSource, java.util.Map params)
           
 java.awt.Dimension getImageSize(ByteSource byteSource, java.util.Map params)
           
 IImageMetadata getMetadata(ByteSource byteSource, java.util.Map params)
           
 java.lang.String getName()
           
 java.lang.String getXmpXml(ByteSource byteSource, java.util.Map params)
          Extracts embedded XML metadata as XML string.
 
Methods inherited from class org.apache.sanselan.ImageParser
canAcceptExtension, canAcceptExtension, canAcceptType, dumpImageFile, dumpImageFile, dumpImageFile, dumpImageFile, getAllBufferedImages, getAllBufferedImages, getAllImageParsers, getBufferedImage, getBufferedImage, getBufferedImageFactory, getFormatCompliance, getFormatCompliance, getFormatCompliance, getICCProfileBytes, getICCProfileBytes, getICCProfileBytes, getICCProfileBytes, getImageInfo, getImageInfo, getImageInfo, getImageSize, getImageSize, getImageSize, getImageSize, getMetadata, getMetadata, getMetadata, getMetadata, getMetadata, isStrict, writeImage
 
Methods inherited from class org.apache.sanselan.common.BinaryFileParser
byteArrayHasPrefix, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToShort, convertByteArrayToShort, getByteOrder, int2ToByteArray, read2Bytes, read3Bytes, read4Bytes, setByteOrder, setByteOrder
 
Methods inherited from class org.apache.sanselan.common.BinaryFileFunctions
CharsToQuad, compareByteArrays, compareByteArrays, compareBytes, compareBytes, convertByteArrayToDouble, convertByteArrayToDouble, convertByteArrayToDoubleArray, convertByteArrayToFloat, convertByteArrayToFloat, convertByteArrayToFloatArray, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToIntArray, convertByteArrayToRational, convertByteArrayToRational, convertByteArrayToRationalArray, convertByteArrayToShort, convertByteArrayToShort, convertByteArrayToShortArray, convertDoubleArrayToByteArray, convertDoubleToByteArray, convertFloatArrayToByteArray, convertFloatToByteArray, convertIntArrayToByteArray, convertIntArrayToRationalArray, convertRationalArrayToByteArray, convertRationalToByteArray, convertShortArrayToByteArray, convertShortToByteArray, copyStreamToStream, debugByteArray, debugNumber, debugNumber, debugNumber, debugNumber, debugNumberArray, findNull, findNull, getBytearrayHead, getByteArrayTail, getDebug, getRAFBytes, getStreamBytes, head, int2ToByteArray, printByteBits, printCharQuad, printCharQuad, read2Bytes, read3Bytes, read4Bytes, readAndVerifyBytes, readAndVerifyBytes, readByte, readBytearray, readByteArray, readByteArray, readBytes, readRandomBytes, scanForByte, setDebug, skipBytes, skipBytes, slice, startsWith, tail, writeIntInToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IcoImageParser

public IcoImageParser()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class ImageParser

getDefaultExtension

public java.lang.String getDefaultExtension()
Specified by:
getDefaultExtension in class ImageParser

getAcceptedExtensions

protected java.lang.String[] getAcceptedExtensions()
Specified by:
getAcceptedExtensions in class ImageParser

getAcceptedTypes

protected ImageFormat[] getAcceptedTypes()
Specified by:
getAcceptedTypes in class ImageParser

embedICCProfile

public boolean embedICCProfile(java.io.File src,
                               java.io.File dst,
                               byte[] profile)
Specified by:
embedICCProfile in class ImageParser

getMetadata

public IImageMetadata getMetadata(ByteSource byteSource,
                                  java.util.Map params)
                           throws ImageReadException,
                                  java.io.IOException
Specified by:
getMetadata in class ImageParser
Throws:
ImageReadException
java.io.IOException

getImageInfo

public ImageInfo getImageInfo(ByteSource byteSource,
                              java.util.Map params)
                       throws ImageReadException,
                              java.io.IOException
Specified by:
getImageInfo in class ImageParser
Throws:
ImageReadException
java.io.IOException

getImageSize

public java.awt.Dimension getImageSize(ByteSource byteSource,
                                       java.util.Map params)
                                throws ImageReadException,
                                       java.io.IOException
Specified by:
getImageSize in class ImageParser
Throws:
ImageReadException
java.io.IOException

getICCProfileBytes

public byte[] getICCProfileBytes(ByteSource byteSource,
                                 java.util.Map params)
                          throws ImageReadException,
                                 java.io.IOException
Specified by:
getICCProfileBytes in class ImageParser
Throws:
ImageReadException
java.io.IOException

getBufferedImage

public final java.awt.image.BufferedImage getBufferedImage(ByteSource byteSource,
                                                           java.util.Map params)
                                                    throws ImageReadException,
                                                           java.io.IOException
Specified by:
getBufferedImage in class ImageParser
Throws:
ImageReadException
java.io.IOException

getAllBufferedImages

public java.util.ArrayList getAllBufferedImages(ByteSource byteSource)
                                         throws ImageReadException,
                                                java.io.IOException
Overrides:
getAllBufferedImages in class ImageParser
Throws:
ImageReadException
java.io.IOException

getXmpXml

public java.lang.String getXmpXml(ByteSource byteSource,
                                  java.util.Map params)
                           throws ImageReadException,
                                  java.io.IOException
Extracts embedded XML metadata as XML string.

Specified by:
getXmpXml in class ImageParser
Parameters:
file - File containing image data.
params - Map of optional parameters, defined in SanselanConstants.
Returns:
Xmp Xml as String, if present. Otherwise, returns null..
Throws:
ImageReadException
java.io.IOException


Copyright © 2007-2009. All Rights Reserved.