ColorProfileUtil
Date: 2016-04-28

org.apache.xmlgraphics.java2d.color.profile

## Class ColorProfileUtil

- java.lang.Object
- - org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil

-     public final class ColorProfileUtil
      extends java.lang.Object

  Helper methods for handling color profiles.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.awt.color.ICC_Profile` | `getICC_Profile(byte[] data)` Proxy method for `ICC_Profile.getInstance(byte[])` that properly synchronizes the call to avoid a potential race condition.
    `static java.awt.color.ICC_Profile` | `getICC_Profile(java.io.InputStream in)` Proxy method for `ICC_Profile.getInstance(java.io.InputStream)` that properly synchronizes the call to avoid a potential race condition.
    `static java.awt.color.ICC_Profile` | `getICC_Profile(int colorSpace)` Proxy method for `ICC_Profile.getInstance(int)` that properly synchronizes the call to avoid a potential race condition.
    `static java.awt.color.ICC_Profile` | `getICC_Profile(java.lang.String fileName)` Proxy method for `ICC_Profile.getInstance(java.lang.String)` that properly synchronizes the call to avoid a potential race condition.
    `static java.lang.String` | `getICCProfileDescription(java.awt.color.ICC_Profile profile)` Returns the profile description of an ICC profile
    `static boolean` | `isDefaultsRGB(java.awt.color.ICC_Profile profile)` Indicates whether a given color profile is identical to the default sRGB profile provided by the Java class library.

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

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

- - ### Method Detail

    - #### getICCProfileDescription

          public static java.lang.String getICCProfileDescription(java.awt.color.ICC_Profile profile)

      Returns the profile description of an ICC profile
      Parameters:
        `profile` - the profile
      Returns:
        the description

    - #### isDefaultsRGB

          public static boolean isDefaultsRGB(java.awt.color.ICC_Profile profile)

      Indicates whether a given color profile is identical to the default sRGB profile provided by the Java class library.
      Parameters:
        `profile` - the color profile to check
      Returns:
        true if it is the default sRGB profile

    - #### getICC_Profile

          public static java.awt.color.ICC_Profile getICC_Profile(byte[] data)

      Proxy method for `ICC_Profile.getInstance(byte[])` that properly synchronizes the call to avoid a potential race condition.
      Parameters:
        `data` - the specified ICC Profile data
      Returns:
        an `ICC_Profile` instance corresponding to the data in the specified byte array

    - #### getICC_Profile

          public static java.awt.color.ICC_Profile getICC_Profile(int colorSpace)

      Proxy method for `ICC_Profile.getInstance(int)` that properly synchronizes the call to avoid a potential race condition.
      Parameters:
        `colorSpace` - the type of color space to create a profile for. The specified type is one of the color space constants defined in the `ColorSpace` class.
      Returns:
        an `ICC_Profile` instance corresponding to the specified `ColorSpace`
      Throws:
        `java.lang.IllegalArgumentException` - if `colorSpace` is not one of the predefined types

    - #### getICC_Profile

          public static java.awt.color.ICC_Profile getICC_Profile(java.io.InputStream in)
                                                           throws java.io.IOException

      Proxy method for `ICC_Profile.getInstance(java.io.InputStream)` that properly synchronizes the call to avoid a potential race condition.
      Parameters:
        `in` - the input stream from which to read the profile data
      Returns:
        an `ICC_Profile` instance corresponding to the data in the specified `InputStream`
      Throws:
        `java.io.IOException` - if an I/O error occurs while reading the stream
        `java.lang.IllegalArgumentException` - if the stream does not contain valid ICC Profile data

    - #### getICC_Profile

          public static java.awt.color.ICC_Profile getICC_Profile(java.lang.String fileName)
                                                           throws java.io.IOException

      Proxy method for `ICC_Profile.getInstance(java.lang.String)` that properly synchronizes the call to avoid a potential race condition.
      Parameters:
        `fileName` - the name of the file that contains the profile data
      Returns:
        an `ICC_Profile` instance corresponding to the data in the specified file
      Throws:
        `java.io.IOException` - if the file cannot be opened, or an I/O error occurs while reading the stream
        `java.lang.IllegalArgumentException` - if the stream does not contain valid ICC Profile data
        `java.lang.SecurityException` - if a security manager is installed and it does not permit read access to the given file.