home *** CD-ROM | disk | FTP | other *** search
/ Print Shop Ensemble 3 / the-print-shop-ensemble-iii.iso / worldnet / disk2 / java.z / MOZ2_01.ZIP / java / lang / SecurityManager.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-03-08  |  3.6 KB  |  130 lines

  1. package java.lang;
  2.  
  3. import java.io.FileDescriptor;
  4.  
  5. public abstract class SecurityManager {
  6.    protected boolean inCheck;
  7.  
  8.    public boolean getInCheck() {
  9.       return this.inCheck;
  10.    }
  11.  
  12.    protected SecurityManager() {
  13.       if (System.getSecurityManager() != null) {
  14.          throw new SecurityException("can't create SecurityManager");
  15.       }
  16.    }
  17.  
  18.    protected native Class[] getClassContext();
  19.  
  20.    protected native ClassLoader currentClassLoader();
  21.  
  22.    protected native int classDepth(String var1);
  23.  
  24.    protected native int classLoaderDepth();
  25.  
  26.    protected boolean inClass(String name) {
  27.       return this.classDepth(name) >= 0;
  28.    }
  29.  
  30.    protected boolean inClassLoader() {
  31.       return this.currentClassLoader() != null;
  32.    }
  33.  
  34.    public Object getSecurityContext() {
  35.       return null;
  36.    }
  37.  
  38.    public void checkCreateClassLoader() {
  39.       throw new SecurityException();
  40.    }
  41.  
  42.    public void checkAccess(Thread g) {
  43.       throw new SecurityException();
  44.    }
  45.  
  46.    public void checkAccess(ThreadGroup g) {
  47.       throw new SecurityException();
  48.    }
  49.  
  50.    public void checkExit(int status) {
  51.       throw new SecurityException();
  52.    }
  53.  
  54.    public void checkExec(String cmd) {
  55.       throw new SecurityException();
  56.    }
  57.  
  58.    public void checkLink(String lib) {
  59.       throw new SecurityException();
  60.    }
  61.  
  62.    public void checkRead(FileDescriptor fd) {
  63.       throw new SecurityException();
  64.    }
  65.  
  66.    public void checkRead(String file) {
  67.       throw new SecurityException();
  68.    }
  69.  
  70.    public void checkRead(String file, Object context) {
  71.       throw new SecurityException();
  72.    }
  73.  
  74.    public void checkWrite(FileDescriptor fd) {
  75.       throw new SecurityException();
  76.    }
  77.  
  78.    public void checkWrite(String file) {
  79.       throw new SecurityException();
  80.    }
  81.  
  82.    public void checkDelete(String file) {
  83.       throw new SecurityException();
  84.    }
  85.  
  86.    public void checkConnect(String host, int port) {
  87.       throw new SecurityException();
  88.    }
  89.  
  90.    public void checkConnect(String host, int port, Object context) {
  91.       throw new SecurityException();
  92.    }
  93.  
  94.    public void checkListen(int port) {
  95.       throw new SecurityException();
  96.    }
  97.  
  98.    public void checkAccept(String host, int port) {
  99.       throw new SecurityException();
  100.    }
  101.  
  102.    public void checkPropertiesAccess() {
  103.       throw new SecurityException();
  104.    }
  105.  
  106.    public void checkPropertyAccess(String key) {
  107.       throw new SecurityException();
  108.    }
  109.  
  110.    public void checkPropertyAccess(String key, String def) {
  111.       throw new SecurityException();
  112.    }
  113.  
  114.    public boolean checkTopLevelWindow(Object window) {
  115.       return false;
  116.    }
  117.  
  118.    public void checkPackageAccess(String pkg) {
  119.       throw new SecurityException();
  120.    }
  121.  
  122.    public void checkPackageDefinition(String pkg) {
  123.       throw new SecurityException();
  124.    }
  125.  
  126.    public void checkSetFactory() {
  127.       throw new SecurityException();
  128.    }
  129. }
  130.