com.jogamp.common.util
Class SecurityUtil

java.lang.Object
  extended by com.jogamp.common.util.SecurityUtil

public class SecurityUtil
extends Object


Constructor Summary
SecurityUtil()
           
 
Method Summary
static void checkAllLinkPermission()
          Throws an SecurityException if an installed SecurityManager does not permit to dynamically link to all libraries.
static void checkAllPermissions()
          Throws an SecurityException if an installed SecurityManager does not permit the requested AllPermission.
static void checkLinkPermission(String libName)
          Throws an SecurityException if an installed SecurityManager does not permit to dynamically link the given libName.
static void checkPermission(Permission perm)
          Throws an SecurityException if an installed SecurityManager does not permit the requested Permission.
static boolean equals(Certificate[] a, Certificate[] b)
           
static Certificate[] getCerts(Class<?> clz)
           
static boolean hasAllPermissions()
          Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(new AllPermission()) passes.
static boolean hasLinkPermission(String libName)
          Returns true if no SecurityManager has been installed or the installed SecurityManager's checkLink(libName) passes.
static boolean hasPermission(Permission perm)
          Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(perm) passes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityUtil

public SecurityUtil()
Method Detail

hasAllPermissions

public static final boolean hasAllPermissions()
Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(new AllPermission()) passes. Otherwise method returns false.


hasPermission

public static final boolean hasPermission(Permission perm)
Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(perm) passes. Otherwise method returns false.


checkAllPermissions

public static final void checkAllPermissions()
                                      throws SecurityException
Throws an SecurityException if an installed SecurityManager does not permit the requested AllPermission.

Throws:
SecurityException

checkPermission

public static final void checkPermission(Permission perm)
                                  throws SecurityException
Throws an SecurityException if an installed SecurityManager does not permit the requested Permission.

Throws:
SecurityException

hasLinkPermission

public static final boolean hasLinkPermission(String libName)
Returns true if no SecurityManager has been installed or the installed SecurityManager's checkLink(libName) passes. Otherwise method returns false.


checkLinkPermission

public static final void checkLinkPermission(String libName)
                                      throws SecurityException
Throws an SecurityException if an installed SecurityManager does not permit to dynamically link the given libName.

Throws:
SecurityException

checkAllLinkPermission

public static final void checkAllLinkPermission()
                                         throws SecurityException
Throws an SecurityException if an installed SecurityManager does not permit to dynamically link to all libraries.

Throws:
SecurityException

getCerts

public static final Certificate[] getCerts(Class<?> clz)
                                    throws SecurityException
Parameters:
clz -
Returns:
Throws:
SecurityException - if the caller has no permission to access the ProtectedDomain of the given class.

equals

public static final boolean equals(Certificate[] a,
                                   Certificate[] b)