jdk/src/share/classes/java/awt/color/ICC_Profile.java
changeset 4209 e2e5a973b879
parent 4206 8925b5c1334b
parent 3958 b8acd5ee4f4f
child 4238 cf990c80a8c2
equal deleted inserted replaced
4208:e14d48eee341 4209:e2e5a973b879
    55 
    55 
    56 import java.util.StringTokenizer;
    56 import java.util.StringTokenizer;
    57 
    57 
    58 import java.security.AccessController;
    58 import java.security.AccessController;
    59 import java.security.PrivilegedAction;
    59 import java.security.PrivilegedAction;
       
    60 
       
    61 import sun.misc.BootClassLoaderHook;
    60 
    62 
    61 /**
    63 /**
    62  * A representation of color profile data for device independent and
    64  * A representation of color profile data for device independent and
    63  * device dependent color spaces based on the International Color
    65  * device dependent color spaces based on the International Color
    64  * Consortium Specification ICC.1:2001-12, File Format for Color Profiles,
    66  * Consortium Specification ICC.1:2001-12, File Format for Color Profiles,
  1828                     new StringTokenizer(path, File.pathSeparator);
  1830                     new StringTokenizer(path, File.pathSeparator);
  1829                 while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) {
  1831                 while (st.hasMoreTokens() && ((f == null) || (!f.isFile()))) {
  1830                     dir = st.nextToken();
  1832                     dir = st.nextToken();
  1831                         fullPath = dir + File.separatorChar + fileName;
  1833                         fullPath = dir + File.separatorChar + fileName;
  1832                     f = new File(fullPath);
  1834                     f = new File(fullPath);
  1833                     if (!isChildOf(f, dir)) {
  1835                 }
  1834                         f = null;
  1836             }
       
  1837 
       
  1838         if (!f.isFile()) { /* try the directory of built-in profiles */
       
  1839             dir = System.getProperty("java.home") +
       
  1840                 File.separatorChar + "lib" + File.separatorChar + "cmm";
       
  1841             fullPath = dir + File.separatorChar + fileName;
       
  1842                 f = new File(fullPath);
       
  1843                 if (!f.isFile()) {
       
  1844                     //make sure file was installed in the kernel mode
       
  1845                     BootClassLoaderHook hook = BootClassLoaderHook.getHook();
       
  1846                     if (hook.getHook() != null) {
       
  1847                         hook.prefetchFile("lib/cmm/"+fileName);
  1835                     }
  1848                     }
  1836                 }
  1849                 }
  1837             }
  1850             }
  1838         if ((f == null) || (!f.isFile())) {
  1851         if ((f == null) || (!f.isFile())) {
  1839             /* try the directory of built-in profiles */
  1852             /* try the directory of built-in profiles */