public LCMS_Profile(ICC_Profile iccProfile) {
   Long handle = (Long) profileCache.get(iccProfile);
   if (handle == null) {
     byte data[] = iccProfile.getData();
     cmsProfileHandle = LCMS.cmsOpenProfileFromMem(data, data.length);
     profileCache.put(iccProfile, new Long(cmsProfileHandle));
   } else cmsProfileHandle = handle.longValue();
 }
 public void dispose() {
   if (cmsProfileHandle != 0) {
     LCMS.cmsCloseProfile(cmsProfileHandle);
     cmsProfileHandle = 0;
   }
 }