Package com.jogamp.common.util
Class SecurityUtil
- java.lang.Object
-
- com.jogamp.common.util.SecurityUtil
-
public class SecurityUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description SecurityUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
checkAllLinkPermission()
Throws anSecurityException
if an installedSecurityManager
does not permit to dynamically link to all libraries.static void
checkAllPermissions()
Throws anSecurityException
if an installedSecurityManager
does not permit the requestedAllPermission
.static void
checkLinkPermission(String libName)
Throws anSecurityException
if an installedSecurityManager
does not permit to dynamically link the given libName.static void
checkPermission(Permission perm)
Throws anSecurityException
if an installedSecurityManager
does not permit the requestedPermission
.static boolean
equals(Certificate[] a, Certificate[] b)
static Certificate[]
getCerts(Class<?> clz)
static boolean
hasAllPermissions()
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckPermission(new AllPermission())
passes.static boolean
hasLinkPermission(String libName)
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckLink(libName)
passes.static boolean
hasPermission(Permission perm)
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckPermission(perm)
passes.
-
-
-
Method Detail
-
hasAllPermissions
public static final boolean hasAllPermissions()
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckPermission(new AllPermission())
passes. Otherwise method returnsfalse
.
-
hasPermission
public static final boolean hasPermission(Permission perm)
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckPermission(perm)
passes. Otherwise method returnsfalse
.
-
checkAllPermissions
public static final void checkAllPermissions() throws SecurityException
Throws anSecurityException
if an installedSecurityManager
does not permit the requestedAllPermission
.- Throws:
SecurityException
-
checkPermission
public static final void checkPermission(Permission perm) throws SecurityException
Throws anSecurityException
if an installedSecurityManager
does not permit the requestedPermission
.- Throws:
SecurityException
-
hasLinkPermission
public static final boolean hasLinkPermission(String libName)
Returnstrue
if noSecurityManager
has been installed or the installedSecurityManager
'scheckLink(libName)
passes. Otherwise method returnsfalse
.
-
checkLinkPermission
public static final void checkLinkPermission(String libName) throws SecurityException
Throws anSecurityException
if an installedSecurityManager
does not permit to dynamically link the given libName.- Throws:
SecurityException
-
checkAllLinkPermission
public static final void checkAllLinkPermission() throws SecurityException
Throws anSecurityException
if an installedSecurityManager
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)
-
-