Class ColorProfileUtil
- java.lang.Object
-
- org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil
-
public final class ColorProfileUtil extends java.lang.ObjectHelper methods for handling color profiles.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.color.ICC_ProfilegetICC_Profile(byte[] data)Proxy method forICC_Profile.getInstance(byte[])that properly synchronizes the call to avoid a potential race condition.static java.awt.color.ICC_ProfilegetICC_Profile(int colorSpace)Proxy method forICC_Profile.getInstance(int)that properly synchronizes the call to avoid a potential race condition.static java.awt.color.ICC_ProfilegetICC_Profile(java.io.InputStream in)Proxy method forICC_Profile.getInstance(java.io.InputStream)that properly synchronizes the call to avoid a potential race condition.static java.awt.color.ICC_ProfilegetICC_Profile(java.lang.String fileName)Proxy method forICC_Profile.getInstance(java.lang.String)that properly synchronizes the call to avoid a potential race condition.static java.lang.StringgetICCProfileDescription(java.awt.color.ICC_Profile profile)Returns the profile description of an ICC profilestatic booleanisDefaultsRGB(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.
-
-
-
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 forICC_Profile.getInstance(byte[])that properly synchronizes the call to avoid a potential race condition.- Parameters:
data- the specified ICC Profile data- Returns:
- an
ICC_Profileinstance corresponding to the data in the specified byte array
-
getICC_Profile
public static java.awt.color.ICC_Profile getICC_Profile(int colorSpace)
Proxy method forICC_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 theColorSpaceclass.- Returns:
- an
ICC_Profileinstance corresponding to the specifiedColorSpace - Throws:
java.lang.IllegalArgumentException- ifcolorSpaceis not one of the predefined types
-
getICC_Profile
public static java.awt.color.ICC_Profile getICC_Profile(java.io.InputStream in) throws java.io.IOExceptionProxy method forICC_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_Profileinstance corresponding to the data in the specifiedInputStream - Throws:
java.io.IOException- if an I/O error occurs while reading the streamjava.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.IOExceptionProxy method forICC_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_Profileinstance 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 streamjava.lang.IllegalArgumentException- if the stream does not contain valid ICC Profile datajava.lang.SecurityException- if a security manager is installed and it does not permit read access to the given file.
-
-