Top Fields Constructors Methods
com.jogamp.common.util

public Class SecurityUtil

extends Object
Class Inheritance
Imports
java.security.AccessController, .AllPermission, .CodeSource, .Permission, .PrivilegedAction, .ProtectionDomain, java.security.cert.Certificate

Field Summary

Modifier and TypeField and Description
private static final RuntimePermission
private static final Permission
private static final boolean
private static final SecurityManager
securityManager

Deprecated as a consequence of SecurityManager being deprecated.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final void
checkAllLinkPermission()

Throws an SecurityException if an installed SecurityManager does not permit to dynamically link to all libraries.

public static final void
checkAllPermissions()

Throws an SecurityException if an installed SecurityManager does not permit the requested AllPermission.

public static final void
checkLinkPermission(final String libName)

Throws an SecurityException if an installed SecurityManager does not permit to dynamically link the given libName.

public static final void
checkPermission(final Permission perm)

Throws an SecurityException if an installed SecurityManager does not permit the requested Permission.

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

public static final Certificate[]
getCerts(final Class<?> clz)

public static final boolean
hasAllPermissions()

Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(new AllPermission()) passes.

public static final boolean
hasLinkPermission(final String libName)

Returns true if no SecurityManager has been installed or the installed SecurityManager's checkLink(libName) passes.

public static final boolean
hasPermission(final Permission perm)

Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(perm) passes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allLinkPermissionback to summary
private static final RuntimePermission allLinkPermission
allPermissionsback to summary
private static final Permission allPermissions
DEBUGback to summary
private static final boolean DEBUG
securityManagerback to summary
private static final SecurityManager securityManager

Deprecated

as a consequence of SecurityManager being deprecated. See corresponding docs for further information.

Constructor Detail

SecurityUtilback to summary
public SecurityUtil()

Method Detail

checkAllLinkPermissionback to summary
public static final void checkAllLinkPermission() throws SecurityException

Throws an SecurityException if an installed SecurityManager does not permit to dynamically link to all libraries.

checkAllPermissionsback to summary
public static final void checkAllPermissions() throws SecurityException

Throws an SecurityException if an installed SecurityManager does not permit the requested AllPermission.

checkLinkPermissionback to summary
public static final void checkLinkPermission(final String libName) throws SecurityException

Throws an SecurityException if an installed SecurityManager does not permit to dynamically link the given libName.

checkPermissionback to summary
public static final void checkPermission(final Permission perm) throws SecurityException

Throws an SecurityException if an installed SecurityManager does not permit the requested Permission.

equalsback to summary
public static final boolean equals(final Certificate[] a, final Certificate[] b)
getCertsback to summary
public static final Certificate[] getCerts(final Class<?> clz) throws SecurityException
Exceptions
SecurityException:
if the caller has no permission to access the ProtectedDomain of the given class.
hasAllPermissionsback to summary
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.

hasLinkPermissionback to summary
public static final boolean hasLinkPermission(final String libName)

Returns true if no SecurityManager has been installed or the installed SecurityManager's checkLink(libName) passes. Otherwise method returns false.

hasPermissionback to summary
public static final boolean hasPermission(final Permission perm)

Returns true if no SecurityManager has been installed or the installed SecurityManager's checkPermission(perm) passes. Otherwise method returns false.