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

## org.apache.xmlgraphics.java2d.color.profile
Class ColorProfileUtil

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

    public final class ColorProfileUtil

extends Object

Helper methods for handling color profiles.

Method Summary
`static 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 ICC_Profile` | `getICC_Profile(InputStream in)` Proxy method for `ICC_Profile.getInstance(java.io.InputStream)` that properly synchronizes the call to avoid a potential race condition.
`static 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 ICC_Profile` | `getICC_Profile(String fileName)` Proxy method for `ICC_Profile.getInstance(java.lang.String)` that properly synchronizes the call to avoid a potential race condition.
`static String` | `getICCProfileDescription(ICC_Profile profile)` Returns the profile description of an ICC profile
`static boolean` | `isDefaultsRGB(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 String getICCProfileDescription(ICC_Profile profile)

  Returns the profile description of an ICC profile

  Parameters:
    `profile` - the profile
  Returns:
    the description

### isDefaultsRGB

    public static boolean isDefaultsRGB(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 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 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:
    `IllegalArgumentException` - if `colorSpace` is not one of the predefined types

### getICC_Profile

    public static ICC_Profile getICC_Profile(InputStream in)
                                      throws 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:
    `IOException` - if an I/O error occurs while reading the stream
    `IllegalArgumentException` - if the stream does not contain valid ICC Profile data

### getICC_Profile

    public static ICC_Profile getICC_Profile(String fileName)
                                      throws 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:
    `IOException` - if the file cannot be opened, or an I/O error occurs while reading the stream
    `IllegalArgumentException` - if the stream does not contain valid ICC Profile data
    `SecurityException` - if a security manager is installed and it does not permit read access to the given file.

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

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.