< prev index next >

src/java.desktop/share/classes/java/awt/color/ICC_Profile.java

Print this page




 743             }
 744         };
 745         ProfileDeferralMgr.registerDeferral(this.profileActivator);
 746     }
 747 
 748     /**
 749      * Frees the resources associated with an {@code ICC_Profile} object.
 750      *
 751      * @deprecated The {@code finalize} method has been deprecated. Subclasses
 752      *         that override {@code finalize} in order to perform cleanup should
 753      *         be modified to use alternative cleanup mechanisms and to remove
 754      *         the overriding {@code finalize} method. When overriding the
 755      *         {@code finalize} method, its implementation must explicitly
 756      *         ensure that {@code super.finalize()} is invoked as described in
 757      *         {@link Object#finalize}. See the specification for {@link
 758      *         Object#finalize()} for further information about migration
 759      *         options.
 760      */
 761     @Deprecated(since="9")
 762     protected void finalize () {
 763         if (cmmProfile != null) {
 764             CMSManager.getModule().freeProfile(cmmProfile);
 765         } else if (profileActivator != null) {
 766             ProfileDeferralMgr.unregisterDeferral(profileActivator);
 767         }
 768     }
 769 
 770     /**
 771      * Constructs an {@code ICC_Profile} object corresponding to the data in a
 772      * byte array. Throws an {@code IllegalArgumentException} if the data does
 773      * not correspond to a valid ICC Profile.
 774      *
 775      * @param  data the specified ICC Profile data
 776      * @return an {@code ICC_Profile} object corresponding to the data in the
 777      *         specified {@code data} array
 778      */
 779     public static ICC_Profile getInstance(byte[] data) {
 780     ICC_Profile thisProfile;
 781 
 782         Profile p = null;
 783 
 784         if (ProfileDeferralMgr.deferring) {
 785             ProfileDeferralMgr.activateProfiles();
 786         }
 787 




 743             }
 744         };
 745         ProfileDeferralMgr.registerDeferral(this.profileActivator);
 746     }
 747 
 748     /**
 749      * Frees the resources associated with an {@code ICC_Profile} object.
 750      *
 751      * @deprecated The {@code finalize} method has been deprecated. Subclasses
 752      *         that override {@code finalize} in order to perform cleanup should
 753      *         be modified to use alternative cleanup mechanisms and to remove
 754      *         the overriding {@code finalize} method. When overriding the
 755      *         {@code finalize} method, its implementation must explicitly
 756      *         ensure that {@code super.finalize()} is invoked as described in
 757      *         {@link Object#finalize}. See the specification for {@link
 758      *         Object#finalize()} for further information about migration
 759      *         options.
 760      */
 761     @Deprecated(since="9")
 762     protected void finalize () {





 763     }
 764 
 765     /**
 766      * Constructs an {@code ICC_Profile} object corresponding to the data in a
 767      * byte array. Throws an {@code IllegalArgumentException} if the data does
 768      * not correspond to a valid ICC Profile.
 769      *
 770      * @param  data the specified ICC Profile data
 771      * @return an {@code ICC_Profile} object corresponding to the data in the
 772      *         specified {@code data} array
 773      */
 774     public static ICC_Profile getInstance(byte[] data) {
 775     ICC_Profile thisProfile;
 776 
 777         Profile p = null;
 778 
 779         if (ProfileDeferralMgr.deferring) {
 780             ProfileDeferralMgr.activateProfiles();
 781         }
 782 


< prev index next >