671 * calling the {@link Image#flush flush} method on the |
671 * calling the {@link Image#flush flush} method on the |
672 * returned {@code Image}. |
672 * returned {@code Image}. |
673 * <p> |
673 * <p> |
674 * This method first checks if there is a security manager installed. |
674 * This method first checks if there is a security manager installed. |
675 * If so, the method calls the security manager's |
675 * If so, the method calls the security manager's |
676 * {@code checkPermission} method with the |
676 * {@code checkPermission} method with the corresponding |
677 * url.openConnection().getPermission() permission to ensure |
677 * permission to ensure that the access to the image is allowed. |
678 * that the access to the image is allowed. For compatibility |
678 * If the connection to the specified URL requires |
679 * with pre-1.2 security managers, if the access is denied with |
679 * either {@code URLPermission} or {@code SocketPermission}, |
680 * {@code FilePermission} or {@code SocketPermission}, |
680 * then {@code URLPermission} is used for security checks. |
|
681 * For compatibility with pre-1.2 security managers, if the access |
|
682 * is denied with {@code FilePermission} or {@code SocketPermission}, |
681 * the method throws the {@code SecurityException} |
683 * the method throws the {@code SecurityException} |
682 * if the corresponding 1.1-style SecurityManager.checkXXX method |
684 * if the corresponding 1.1-style SecurityManager.checkXXX method |
683 * also denies permission. |
685 * also denies permission. |
684 * @param url the URL to use in fetching the pixel data. |
686 * @param url the URL to use in fetching the pixel data. |
685 * @return an image which gets its pixel data from |
687 * @return an image which gets its pixel data from |
715 * The returned Image is a new object which will not be shared |
717 * The returned Image is a new object which will not be shared |
716 * with any other caller of this method or its getImage variant. |
718 * with any other caller of this method or its getImage variant. |
717 * <p> |
719 * <p> |
718 * This method first checks if there is a security manager installed. |
720 * This method first checks if there is a security manager installed. |
719 * If so, the method calls the security manager's |
721 * If so, the method calls the security manager's |
720 * {@code checkPermission} method with the |
722 * {@code checkPermission} method with the corresponding |
721 * url.openConnection().getPermission() permission to ensure |
723 * permission to ensure that the image creation is allowed. |
722 * that the image creation is allowed. For compatibility |
724 * If the connection to the specified URL requires |
723 * with pre-1.2 security managers, if the access is denied with |
725 * either {@code URLPermission} or {@code SocketPermission}, |
724 * {@code FilePermission} or {@code SocketPermission}, |
726 * then {@code URLPermission} is used for security checks. |
|
727 * For compatibility with pre-1.2 security managers, if the access |
|
728 * is denied with {@code FilePermission} or {@code SocketPermission}, |
725 * the method throws {@code SecurityException} |
729 * the method throws {@code SecurityException} |
726 * if the corresponding 1.1-style SecurityManager.checkXXX method |
730 * if the corresponding 1.1-style SecurityManager.checkXXX method |
727 * also denies permission. |
731 * also denies permission. |
728 * @param url the URL to use in fetching the pixel data. |
732 * @param url the URL to use in fetching the pixel data. |
729 * @return an image which gets its pixel data from |
733 * @return an image which gets its pixel data from |