Package org.apache.commons.imaging

## Class ImageParser<T extends ImagingParameters>

- java.lang.Object
- - org.apache.commons.imaging.common.BinaryFileParser
  - - org.apache.commons.imaging.ImageParser<T>

- Type Parameters:
    `T` - type of parameters used by this image parser
  Direct Known Subclasses:
    `BmpImageParser`, `DcxImageParser`, `GifImageParser`, `IcnsImageParser`, `IcoImageParser`, `JpegImageParser`, `PcxImageParser`, `PngImageParser`, `PnmImageParser`, `PsdImageParser`, `RgbeImageParser`, `TiffImageParser`, `WbmpImageParser`, `XbmImageParser`, `XpmImageParser`

      public abstract class ImageParser<T extends ImagingParameters>
      extends BinaryFileParser

  Provides the abstract base class for all image reading and writing utilities. ImageParser implementations are expected to extend this class providing logic for identifying and processing data in their own specific format. Specific implementations are found under the com.apache.commons.imaging.formats package.

  ## Application Notes

  ### Format support

  For the most recent information on format support for the Apache Commons Imaging package, refer to Format Support at the main project development web site.

  ### On the accuracy of this Javadoc

  The original authors of this class did not supply documentation. The Javadoc for this class is based on inspection of the source code. In some cases, the purpose and usage for particular methods was deduced from the source and may not perfectly reflect the intentions of the original. Therefore, you should not assume that the documentation is perfect, especially in the more obscure and specialized areas of implementation.

  ### The "params" argument

  Many of the methods specified by this class accept an argument of type `T` defining the parameters to be used when processing an image. For example, some of the output formats permit of different kinds of image compression or color models. Some of the reading methods permit the calling application to require strict format compliance.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ImageParser()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `canAcceptExtension​(File file)` | Indicates whether the ImageParser implementation can accept the specified file based on its extension.
    `boolean` | `canAcceptExtension​(String fileName)` | Indicates whether the ImageParser implementation can accept the specified file name based on its extension.
    `boolean` | `canAcceptType​(ImageFormat type)` | Indicates whether the ImageParser implementation can accept the specified format
    `String` | `dumpImageFile​(byte[] bytes)` | Write the ImageInfo and format-specific information for the image content of the specified byte array to a string.
    `String` | `dumpImageFile​(File file)` | Write the ImageInfo and format-specific information for the image content of the specified file to a string.
    `boolean` | `dumpImageFile​(PrintWriter pw, ByteSource byteSource)` | Write the ImageInfo and format-specific information for the image content of the specified byte source to a PrintWriter
    `String` | `dumpImageFile​(ByteSource byteSource)` | Write the ImageInfo and format-specific information for the image content of the specified byte source to a string.
    `protected abstract String[]` | `getAcceptedExtensions()` | Get an array of all accepted extensions
    `protected abstract ImageFormat[]` | `getAcceptedTypes()` | Get an array of ImageFormat objects describing all accepted types
    `List<BufferedImage>` | `getAllBufferedImages​(byte[] bytes)` | Gets all images specified by the byte array (some formats may include multiple images within a single data source).
    `List<BufferedImage>` | `getAllBufferedImages​(File file)` | Gets all images specified by indicated file (some formats may include multiple images within a single data source).
    `List<BufferedImage>` | `getAllBufferedImages​(ByteSource byteSource)` | Gets all images specified by the byte source (some formats may include multiple images within a single data source).
    `static List<ImageParser<?>>` | `getAllImageParsers()` | Gets an array of new instances of all image parsers.
    `BufferedImage` | `getBufferedImage​(byte[] bytes, T params)` | Gets a buffered image specified by the byte array (for sources that specify multiple images, choice of which image is returned is implementation dependent).
    `BufferedImage` | `getBufferedImage​(File file, T params)` | Gets a buffered image specified by the indicated file (for sources that specify multiple images, choice of which image is returned is implementation dependent).
    `abstract BufferedImage` | `getBufferedImage​(ByteSource byteSource, T params)` | Gets a buffered image specified by the byte source (for sources that specify multiple images, choice of which image is returned is implementation dependent).
    `protected BufferedImageFactory` | `getBufferedImageFactory​(T params)` | Get an instance of IBufferedImageFactory based on the presence of a specification for ImagingConstants..BUFFERED_IMAGE_FACTORY within the supplied params.
    `abstract String` | `getDefaultExtension()` | Get the default extension for the format specified by an implementation of ImageParser.
    `abstract T` | `getDefaultParameters()` | Get a default parameters instance for this parser.
    `FormatCompliance` | `getFormatCompliance​(byte[] bytes)` | Determines the format compliance of the content of the supplied byte array based on rules provided by a specific implementation.
    `FormatCompliance` | `getFormatCompliance​(File file)` | Determines the format compliance of the specified file based on rules provided by a specific implementation.
    `FormatCompliance` | `getFormatCompliance​(ByteSource byteSource)` | Determines the format compliance of the content of the supplied byte source based on rules provided by a specific implementation.
    `byte[]` | `getICCProfileBytes​(byte[] bytes)` | Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byte array.
    `byte[]` | `getICCProfileBytes​(byte[] bytes, T params)` | Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byte array.
    `byte[]` | `getICCProfileBytes​(File file)` | Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input file.
    `byte[]` | `getICCProfileBytes​(File file, T params)` | Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input file.
    `abstract byte[]` | `getICCProfileBytes​(ByteSource byteSource, T params)` | Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byteSource.
    `ImageInfo` | `getImageInfo​(byte[] bytes, T params)` | Get image information from the specified array of bytes.
    `ImageInfo` | `getImageInfo​(File file, T params)` | Get image information from the specified file Format-specific ImageParser implementations are expected to return a valid ImageInfo object or to throw an ImageReadException if unable to process the specified data.
    `ImageInfo` | `getImageInfo​(ByteSource byteSource)` | Get image information from the specified ByteSource.
    `abstract ImageInfo` | `getImageInfo​(ByteSource byteSource, T params)` | Get image information from the specified ByteSource.
    `Dimension` | `getImageSize​(byte[] bytes)` | Get the size of the image described by the specified byte array.
    `Dimension` | `getImageSize​(byte[] bytes, T params)` | Get the size of the image described by the specified byte array.
    `Dimension` | `getImageSize​(File file)` | Get the size of the image described by the specified file.
    `Dimension` | `getImageSize​(File file, T params)` | Get the size of the image described by the specified file.
    `abstract Dimension` | `getImageSize​(ByteSource byteSource, T params)` | Get the size of the image described by the specified ByteSource.
    `ImageMetadata` | `getMetadata​(byte[] bytes)` | Get image metadata from the specified array of bytes.
    `ImageMetadata` | `getMetadata​(byte[] bytes, T params)` | Get image metadata from the specified array of bytes.
    `ImageMetadata` | `getMetadata​(File file)` | Get image metadata from the specified file.
    `ImageMetadata` | `getMetadata​(File file, T params)` | Get image metadata from the specified file.
    `ImageMetadata` | `getMetadata​(ByteSource byteSource)` | Get image metadata from the specified byte source.
    `abstract ImageMetadata` | `getMetadata​(ByteSource byteSource, T params)` | Get image metadata from the specified byte source.
    `abstract String` | `getName()` | Get a descriptive name for the implementation of an ImageParser.
    `void` | `writeImage​(BufferedImage src, OutputStream os, T params)` | Writes the content of a BufferedImage to the specified output stream.

    - ### Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser

      `debugNumber, debugNumber, getByteOrder, setByteOrder`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ImageParser

          public ImageParser()

  - ### Method Detail

    - #### getAllImageParsers

          public static List<ImageParser<?>> getAllImageParsers()

      Gets an array of new instances of all image parsers.
      Returns:
        A valid array of image parsers

    - #### getDefaultParameters

          public abstract T getDefaultParameters()

      Get a default parameters instance for this parser.
      Returns:
        default parameters instance

    - #### getMetadata

          public final ImageMetadata getMetadata​(ByteSource byteSource)
                                          throws ImageReadException,
                                                 IOException

      Get image metadata from the specified byte source. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified byte source.
      Parameters:
        `byteSource` - A valid byte source.
      Returns:
        A valid, potentially subject-matter-specific implementation of the IImageMetadata interface describing the content extracted from the source content.
      Throws:
        `ImageReadException` - In the event that the ByteSource content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data read operation.

    - #### getMetadata

          public abstract ImageMetadata getMetadata​(ByteSource byteSource,
                                                    T params)
                                             throws ImageReadException,
                                                    IOException

      Get image metadata from the specified byte source. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified byte source.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `byteSource` - A valid byte source.
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid, potentially subject-matter-specific implementation of the IImageMetadata interface describing the content extracted from the source content.
      Throws:
        `ImageReadException` - In the event that the ByteSource content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data read operation.

    - #### getMetadata

          public final ImageMetadata getMetadata​(byte[] bytes)
                                          throws ImageReadException,
                                                 IOException

      Get image metadata from the specified array of bytes. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified data.
      Parameters:
        `bytes` - A valid array of bytes
      Returns:
        A valid, potentially subject-matter-specific implementation of the IImageMetadata interface describing the content extracted from the source content.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data read operation.

    - #### getMetadata

          public final ImageMetadata getMetadata​(byte[] bytes,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get image metadata from the specified array of bytes. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified data.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `bytes` - A valid array of bytes
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid image metadata object describing the content extracted from the specified content.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data read operation.

    - #### getMetadata

          public final ImageMetadata getMetadata​(File file)
                                          throws ImageReadException,
                                                 IOException

      Get image metadata from the specified file. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified data.
      Parameters:
        `file` - A valid reference to a file.
      Returns:
        A valid image metadata object describing the content extracted from the specified content.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful file read or access operation.

    - #### getMetadata

          public final ImageMetadata getMetadata​(File file,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get image metadata from the specified file. Format-specific ImageParser implementations are expected to return a valid IImageMetadata object or to throw an ImageReadException if unable to process the specified data.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `file` - A valid reference to a file.
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid image metadata object describing the content extracted from the specified content.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful file read or access operation.

    - #### getImageInfo

          public abstract ImageInfo getImageInfo​(ByteSource byteSource,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get image information from the specified ByteSource. Format-specific ImageParser implementations are expected to return a valid ImageInfo object or to throw an ImageReadException if unable to process the specified data.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `byteSource` - A valid ByteSource object
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid image information object describing the content extracted from the specified data.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data access operation.

    - #### getImageInfo

          public final ImageInfo getImageInfo​(ByteSource byteSource)
                                       throws ImageReadException,
                                              IOException

      Get image information from the specified ByteSource. Format-specific ImageParser implementations are expected to return a valid ImageInfo object or to throw an ImageReadException if unable to process the specified data.
      Parameters:
        `byteSource` - A valid ByteSource object
      Returns:
        A valid image information object describing the content extracted from the specified data.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data access operation.

    - #### getImageInfo

          public final ImageInfo getImageInfo​(byte[] bytes,
                                              T params)
                                       throws ImageReadException,
                                              IOException

      Get image information from the specified array of bytes. Format-specific ImageParser implementations are expected to return a valid ImageInfo object or to throw an ImageReadException if unable to process the specified data.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `bytes` - A valid array of bytes
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid image information object describing the content extracted from the specified data.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful data access operation.

    - #### getImageInfo

          public final ImageInfo getImageInfo​(File file,
                                              T params)
                                       throws ImageReadException,
                                              IOException

      Get image information from the specified file Format-specific ImageParser implementations are expected to return a valid ImageInfo object or to throw an ImageReadException if unable to process the specified data.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will require this capability. Because the base class may call this method with a null params argument, implementations should always include logic for ignoring null input.

      Parameters:
        `file` - A valid File object
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid image information object describing the content extracted from the specified data.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful file read or access operation.

    - #### getFormatCompliance

          public FormatCompliance getFormatCompliance​(ByteSource byteSource)
                                               throws ImageReadException,
                                                      IOException

      Determines the format compliance of the content of the supplied byte source based on rules provided by a specific implementation.
      Parameters:
        `byteSource` - A valid instance of ByteSource
      Returns:
        true if the content is format-compliant; otherwise, false
      Throws:
        `ImageReadException` - may be thrown by sub-classes
        `IOException` - may be thrown by sub-classes

    - #### getFormatCompliance

          public final FormatCompliance getFormatCompliance​(byte[] bytes)
                                                     throws ImageReadException,
                                                            IOException

      Determines the format compliance of the content of the supplied byte array based on rules provided by a specific implementation.
      Parameters:
        `bytes` - A valid byte array.
      Returns:
        A valid FormatCompliance object.
      Throws:
        `ImageReadException` - may be thrown by sub-classes
        `IOException` - may be thrown by sub-classes

    - #### getFormatCompliance

          public final FormatCompliance getFormatCompliance​(File file)
                                                     throws ImageReadException,
                                                            IOException

      Determines the format compliance of the specified file based on rules provided by a specific implementation.
      Parameters:
        `file` - A valid reference to a file.
      Returns:
        A valid format compliance object.
      Throws:
        `ImageReadException` - may be thrown by sub-classes
        `IOException` - may be thrown by sub-classes

    - #### getAllBufferedImages

          public List<BufferedImage> getAllBufferedImages​(ByteSource byteSource)
                                                   throws ImageReadException,
                                                          IOException

      Gets all images specified by the byte source (some formats may include multiple images within a single data source).
      Parameters:
        `byteSource` - A valid instance of ByteSource.
      Returns:
        A valid (potentially empty) list of BufferedImage objects.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getAllBufferedImages

          public final List<BufferedImage> getAllBufferedImages​(byte[] bytes)
                                                         throws ImageReadException,
                                                                IOException

      Gets all images specified by the byte array (some formats may include multiple images within a single data source).
      Parameters:
        `bytes` - A valid byte array
      Returns:
        A valid (potentially empty) list of BufferedImage objects.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getAllBufferedImages

          public final List<BufferedImage> getAllBufferedImages​(File file)
                                                         throws ImageReadException,
                                                                IOException

      Gets all images specified by indicated file (some formats may include multiple images within a single data source).
      Parameters:
        `file` - A valid reference to a file.
      Returns:
        A valid (potentially empty) list of BufferedImage objects.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getBufferedImage

          public abstract BufferedImage getBufferedImage​(ByteSource byteSource,
                                                         T params)
                                                  throws ImageReadException,
                                                         IOException

      Gets a buffered image specified by the byte source (for sources that specify multiple images, choice of which image is returned is implementation dependent).
      Parameters:
        `byteSource` - A valid instance of ByteSource
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid instance of BufferedImage.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getBufferedImage

          public final BufferedImage getBufferedImage​(byte[] bytes,
                                                      T params)
                                               throws ImageReadException,
                                                      IOException

      Gets a buffered image specified by the byte array (for sources that specify multiple images, choice of which image is returned is implementation dependent).
      Parameters:
        `bytes` - A valid byte array
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid instance of BufferedImage.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getBufferedImage

          public final BufferedImage getBufferedImage​(File file,
                                                      T params)
                                               throws ImageReadException,
                                                      IOException

      Gets a buffered image specified by the indicated file (for sources that specify multiple images, choice of which image is returned is implementation dependent).
      Parameters:
        `file` - A valid file reference.
        `params` - Optional instructions for special-handling or interpretation of the input data (null objects are permitted and must be supported by implementations).
      Returns:
        A valid instance of BufferedImage.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### writeImage

          public void writeImage​(BufferedImage src,
                                 OutputStream os,
                                 T params)
                          throws ImageWriteException,
                                 IOException

      Writes the content of a BufferedImage to the specified output stream.

      The params argument provides a mechanism for individual implementations to pass optional information into the parser. Not all formats will support this capability. Currently, some of the parsers do not check for null arguments.

      Parameters:
        `src` - An image giving the source content for output
        `os` - A valid output stream for storing the formatted image
        `params` - optional parameters, defining format-specific instructions for output (such as selections for data compression, color models, etc.)
      Throws:
        `ImageWriteException` - In the event that the output format cannot handle the input image or invalid params are specified.
        `IOException` - In the event of an write error from the output stream.

    - #### getImageSize

          public final Dimension getImageSize​(byte[] bytes)
                                       throws ImageReadException,
                                              IOException

      Get the size of the image described by the specified byte array.
      Parameters:
        `bytes` - A valid byte array.
      Returns:
        A valid instance of Dimension.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getImageSize

          public final Dimension getImageSize​(byte[] bytes,
                                              T params)
                                       throws ImageReadException,
                                              IOException

      Get the size of the image described by the specified byte array.
      Parameters:
        `bytes` - A valid byte array.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        A valid instance of Dimension.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getImageSize

          public final Dimension getImageSize​(File file)
                                       throws ImageReadException,
                                              IOException

      Get the size of the image described by the specified file.
      Parameters:
        `file` - A valid reference to a file.
      Returns:
        A valid instance of Dimension.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getImageSize

          public final Dimension getImageSize​(File file,
                                              T params)
                                       throws ImageReadException,
                                              IOException

      Get the size of the image described by the specified file.
      Parameters:
        `file` - A valid reference to a file.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        A valid instance of Dimension.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getImageSize

          public abstract Dimension getImageSize​(ByteSource byteSource,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get the size of the image described by the specified ByteSource.
      Parameters:
        `byteSource` - A valid reference to a ByteSource.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        A valid instance of Dimension.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getICCProfileBytes

          public final byte[] getICCProfileBytes​(byte[] bytes)
                                          throws ImageReadException,
                                                 IOException

      Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byte array. Not all formats support ICC profiles.
      Parameters:
        `bytes` - A valid array of bytes.
      Returns:
        If available, a valid array of bytes; otherwise, a null
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getICCProfileBytes

          public final byte[] getICCProfileBytes​(byte[] bytes,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byte array. Not all formats support ICC profiles.
      Parameters:
        `bytes` - A valid array of bytes.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        If available, a valid array of bytes; otherwise, a null
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getICCProfileBytes

          public final byte[] getICCProfileBytes​(File file)
                                          throws ImageReadException,
                                                 IOException

      Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input file. Not all formats support ICC profiles.
      Parameters:
        `file` - A valid file reference.
      Returns:
        If available, a valid array of bytes; otherwise, a null
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getICCProfileBytes

          public final byte[] getICCProfileBytes​(File file,
                                                 T params)
                                          throws ImageReadException,
                                                 IOException

      Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input file. Not all formats support ICC profiles.
      Parameters:
        `file` - A valid file reference.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        If available, a valid array of bytes; otherwise, a null
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getICCProfileBytes

          public abstract byte[] getICCProfileBytes​(ByteSource byteSource,
                                                    T params)
                                             throws ImageReadException,
                                                    IOException

      Get an array of bytes describing the International Color Consortium (ICC) specification for the color space of the image contained in the input byteSource. Not all formats support ICC profiles.
      Parameters:
        `byteSource` - A valid ByteSource.
        `params` - Optional instructions for special-handling or interpretation of the input data.
      Returns:
        If available, a valid array of bytes; otherwise, a null
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### dumpImageFile

          public final String dumpImageFile​(byte[] bytes)
                                     throws ImageReadException,
                                            IOException

      Write the ImageInfo and format-specific information for the image content of the specified byte array to a string.
      Parameters:
        `bytes` - A valid array of bytes.
      Returns:
        A valid string.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### dumpImageFile

          public final String dumpImageFile​(File file)
                                     throws ImageReadException,
                                            IOException

      Write the ImageInfo and format-specific information for the image content of the specified file to a string.
      Parameters:
        `file` - A valid file reference.
      Returns:
        A valid string.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### dumpImageFile

          public final String dumpImageFile​(ByteSource byteSource)
                                     throws ImageReadException,
                                            IOException

      Write the ImageInfo and format-specific information for the image content of the specified byte source to a string.
      Parameters:
        `byteSource` - A valid byte source.
      Returns:
        A valid string.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### dumpImageFile

          public boolean dumpImageFile​(PrintWriter pw,
                                       ByteSource byteSource)
                                throws ImageReadException,
                                       IOException

      Write the ImageInfo and format-specific information for the image content of the specified byte source to a PrintWriter
      Parameters:
        `pw` - print writer used for writing the ImageInfo
        `byteSource` - A valid byte source.
      Returns:
        A valid PrintWriter.
      Throws:
        `ImageReadException` - In the event that the specified content does not conform to the format of the specific parser implementation.
        `IOException` - In the event of unsuccessful read or access operation.

    - #### getName

          public abstract String getName()

      Get a descriptive name for the implementation of an ImageParser.
      Returns:
        a valid, subject-matter-specific string.

    - #### getDefaultExtension

          public abstract String getDefaultExtension()

      Get the default extension for the format specified by an implementation of ImageParser. Some parsers can support more than one extension (i.e. .JPEG, .JPG; .TIF, .TIFF, etc.).
      Returns:
        A valid string.

    - #### getAcceptedExtensions

          protected abstract String[] getAcceptedExtensions()

      Get an array of all accepted extensions
      Returns:
        A valid array of one or more elements.

    - #### getAcceptedTypes

          protected abstract ImageFormat[] getAcceptedTypes()

      Get an array of ImageFormat objects describing all accepted types
      Returns:
        A valid array of one or more elements.

    - #### canAcceptType

          public boolean canAcceptType​(ImageFormat type)

      Indicates whether the ImageParser implementation can accept the specified format
      Parameters:
        `type` - An instance of ImageFormat.
      Returns:
        If the parser can accept the format, true; otherwise, false.

    - #### canAcceptExtension

          public boolean canAcceptExtension​(File file)

      Indicates whether the ImageParser implementation can accept the specified file based on its extension.
      Parameters:
        `file` - An valid file reference.
      Returns:
        If the parser can accept the format, true; otherwise, false.

    - #### canAcceptExtension

          public final boolean canAcceptExtension​(String fileName)

      Indicates whether the ImageParser implementation can accept the specified file name based on its extension.
      Parameters:
        `fileName` - A valid string giving a file name or file path.
      Returns:
        If the parser can accept the format, true; otherwise, false.

    - #### getBufferedImageFactory

          protected BufferedImageFactory getBufferedImageFactory​(T params)

      Get an instance of IBufferedImageFactory based on the presence of a specification for ImagingConstants..BUFFERED_IMAGE_FACTORY within the supplied params.
      Parameters:
        `params` - optional parameters.
      Returns:
        A valid instance of an implementation of a IBufferedImageFactory.