Most visited

Recently visited

Added in API level 1

SecurityManager

public class SecurityManager
extends Object

java.lang.Object
   ↳ java.lang.SecurityManager


Legacy security code; do not use.

Summary

Fields

protected boolean inCheck

This field was deprecated in API level 1. Use checkPermission(Permission) instead.

Public constructors

SecurityManager()

Public methods

void checkAccept(String host, int port)
void checkAccess(Thread t)
void checkAccess(ThreadGroup g)
void checkAwtEventQueueAccess()
void checkConnect(String host, int port)
void checkConnect(String host, int port, Object context)
void checkCreateClassLoader()
void checkDelete(String file)
void checkExec(String cmd)
void checkExit(int status)
void checkLink(String lib)
void checkListen(int port)
void checkMemberAccess(Class<?> clazz, int which)
void checkMulticast(InetAddress maddr)
void checkMulticast(InetAddress maddr, byte ttl)

This method was deprecated in API level 1. use checkMulticast(java.net.InetAddress) instead.

void checkPackageAccess(String pkg)
void checkPackageDefinition(String pkg)
void checkPermission(Permission perm, Object context)
void checkPermission(Permission perm)
void checkPrintJobAccess()
void checkPropertiesAccess()
void checkPropertyAccess(String key)
void checkRead(FileDescriptor fd)
void checkRead(String file)
void checkRead(String file, Object context)
void checkSecurityAccess(String target)
void checkSetFactory()
void checkSystemClipboardAccess()
boolean checkTopLevelWindow(Object window)
void checkWrite(FileDescriptor fd)
void checkWrite(String file)
boolean getInCheck()

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

Object getSecurityContext()
ThreadGroup getThreadGroup()

Returns the current thread's thread group.

Protected methods

int classDepth(String name)

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

int classLoaderDepth()

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

ClassLoader currentClassLoader()

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

Class<?> currentLoadedClass()

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

Class[] getClassContext()
boolean inClass(String name)

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

boolean inClassLoader()

This method was deprecated in API level 1. Use checkPermission(Permission) instead.

Inherited methods

From class java.lang.Object

Fields

inCheck

Added in API level 1
boolean inCheck

This field was deprecated in API level 1.
Use checkPermission(Permission) instead.

Public constructors

SecurityManager

Added in API level 1
SecurityManager ()

Public methods

checkAccept

Added in API level 1
void checkAccept (String host, 
                int port)

Parameters
host String
port int

checkAccess

Added in API level 1
void checkAccess (Thread t)

Parameters
t Thread

checkAccess

Added in API level 1
void checkAccess (ThreadGroup g)

Parameters
g ThreadGroup

checkAwtEventQueueAccess

Added in API level 1
void checkAwtEventQueueAccess ()

checkConnect

Added in API level 1
void checkConnect (String host, 
                int port)

Parameters
host String
port int

checkConnect

Added in API level 1
void checkConnect (String host, 
                int port, 
                Object context)

Parameters
host String
port int
context Object

checkCreateClassLoader

Added in API level 1
void checkCreateClassLoader ()

checkDelete

Added in API level 1
void checkDelete (String file)

Parameters
file String

checkExec

Added in API level 1
void checkExec (String cmd)

Parameters
cmd String

checkExit

Added in API level 1
void checkExit (int status)

Parameters
status int

checkLink

Added in API level 1
void checkLink (String lib)

Parameters
lib String

checkListen

Added in API level 1
void checkListen (int port)

Parameters
port int

checkMemberAccess

Added in API level 1
void checkMemberAccess (Class<?> clazz, 
                int which)

Parameters
clazz Class
which int

checkMulticast

Added in API level 1
void checkMulticast (InetAddress maddr)

Parameters
maddr InetAddress

checkMulticast

Added in API level 1
void checkMulticast (InetAddress maddr, 
                byte ttl)

This method was deprecated in API level 1.
use checkMulticast(java.net.InetAddress) instead.

Parameters
maddr InetAddress
ttl byte

checkPackageAccess

Added in API level 1
void checkPackageAccess (String pkg)

Parameters
pkg String

checkPackageDefinition

Added in API level 1
void checkPackageDefinition (String pkg)

Parameters
pkg String

checkPermission

Added in API level 1
void checkPermission (Permission perm, 
                Object context)

Parameters
perm Permission
context Object

checkPermission

Added in API level 1
void checkPermission (Permission perm)

Parameters
perm Permission

checkPrintJobAccess

Added in API level 1
void checkPrintJobAccess ()

checkPropertiesAccess

Added in API level 1
void checkPropertiesAccess ()

checkPropertyAccess

Added in API level 1
void checkPropertyAccess (String key)

Parameters
key String

checkRead

Added in API level 1
void checkRead (FileDescriptor fd)

Parameters
fd FileDescriptor

checkRead

Added in API level 1
void checkRead (String file)

Parameters
file String

checkRead

Added in API level 1
void checkRead (String file, 
                Object context)

Parameters
file String
context Object

checkSecurityAccess

Added in API level 1
void checkSecurityAccess (String target)

Parameters
target String

checkSetFactory

Added in API level 1
void checkSetFactory ()

checkSystemClipboardAccess

Added in API level 1
void checkSystemClipboardAccess ()

checkTopLevelWindow

Added in API level 1
boolean checkTopLevelWindow (Object window)

Parameters
window Object
Returns
boolean

checkWrite

Added in API level 1
void checkWrite (FileDescriptor fd)

Parameters
fd FileDescriptor

checkWrite

Added in API level 1
void checkWrite (String file)

Parameters
file String

getInCheck

Added in API level 1
boolean getInCheck ()

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Returns
boolean

getSecurityContext

Added in API level 1
Object getSecurityContext ()

Returns
Object

getThreadGroup

Added in API level 1
ThreadGroup getThreadGroup ()

Returns the current thread's thread group.

Returns
ThreadGroup

Protected methods

classDepth

Added in API level 1
int classDepth (String name)

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Parameters
name String
Returns
int

classLoaderDepth

Added in API level 1
int classLoaderDepth ()

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Returns
int

currentClassLoader

Added in API level 1
ClassLoader currentClassLoader ()

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Returns
ClassLoader

currentLoadedClass

Added in API level 1
Class<?> currentLoadedClass ()

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Returns
Class<?>

getClassContext

Added in API level 1
Class[] getClassContext ()

Returns
Class[]

inClass

Added in API level 1
boolean inClass (String name)

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Parameters
name String
Returns
boolean

inClassLoader

Added in API level 1
boolean inClassLoader ()

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

Returns
boolean

Hooray!