home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / ie4 / IE4 / JAVI386.CAB / classr.exe / java / lang / System.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-31  |  2.8 KB  |  120 lines

  1. package java.lang;
  2.  
  3. import java.io.BufferedInputStream;
  4. import java.io.BufferedOutputStream;
  5. import java.io.FileDescriptor;
  6. import java.io.FileInputStream;
  7. import java.io.FileOutputStream;
  8. import java.io.InputStream;
  9. import java.io.PrintStream;
  10. import java.util.Properties;
  11.  
  12. public final class System {
  13.    // $FF: renamed from: in java.io.InputStream
  14.    public static InputStream field_0;
  15.    public static PrintStream out;
  16.    public static PrintStream err;
  17.    private static SecurityManager security;
  18.    private static Properties props;
  19.  
  20.    public static String getProperty(String var0) {
  21.       if (security != null) {
  22.          security.checkPropertyAccess(var0);
  23.       }
  24.  
  25.       if (props == null) {
  26.          props = initProperties(new Properties());
  27.       }
  28.  
  29.       return props.getProperty(var0);
  30.    }
  31.  
  32.    public static String getProperty(String var0, String var1) {
  33.       if (security != null) {
  34.          security.checkPropertyAccess(var0);
  35.       }
  36.  
  37.       if (props == null) {
  38.          props = initProperties(new Properties());
  39.       }
  40.  
  41.       return props.getProperty(var0, var1);
  42.    }
  43.  
  44.    public static void exit(int var0) {
  45.       Runtime.getRuntime().exit(var0);
  46.    }
  47.  
  48.    public static native void arraycopy(Object var0, int var1, Object var2, int var3, int var4);
  49.  
  50.    static {
  51.       try {
  52.          field_0 = Runtime.getRuntime().getLocalizedInputStream(new BufferedInputStream(new FileInputStream(FileDescriptor.in), 128));
  53.          out = new PrintStream(Runtime.getRuntime().getLocalizedOutputStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.out), 128)), true);
  54.          err = new PrintStream(Runtime.getRuntime().getLocalizedOutputStream(new BufferedOutputStream(new FileOutputStream(FileDescriptor.err), 128)), true);
  55.       } catch (Exception var1) {
  56.          throw new Error("can't initialize stdio");
  57.       }
  58.    }
  59.  
  60.    // $FF: renamed from: gc () void
  61.    public static void method_0() {
  62.       Runtime.getRuntime().gc();
  63.    }
  64.  
  65.    public static void runFinalization() {
  66.       Runtime.getRuntime().runFinalization();
  67.    }
  68.  
  69.    public static void setSecurityManager(SecurityManager var0) {
  70.       if (security != null) {
  71.          throw new SecurityException("SecurityManager already set");
  72.       } else {
  73.          security = var0;
  74.       }
  75.    }
  76.  
  77.    public static SecurityManager getSecurityManager() {
  78.       return security;
  79.    }
  80.  
  81.    public static void load(String var0) {
  82.       Runtime.getRuntime().load(var0);
  83.    }
  84.  
  85.    public static Properties getProperties() {
  86.       if (props == null) {
  87.          props = initProperties(new Properties());
  88.       }
  89.  
  90.       if (security != null) {
  91.          security.checkPropertiesAccess();
  92.       }
  93.  
  94.       return props;
  95.    }
  96.  
  97.    public static String getenv(String var0) {
  98.       throw new Error("getenv no longer supported, use properties and -D instead: " + var0);
  99.    }
  100.  
  101.    public static void loadLibrary(String var0) {
  102.       Runtime.getRuntime().loadLibrary(var0);
  103.    }
  104.  
  105.    public static native long currentTimeMillis();
  106.  
  107.    private static native Properties initProperties(Properties var0);
  108.  
  109.    private System() {
  110.    }
  111.  
  112.    public static void setProperties(Properties var0) {
  113.       if (security != null) {
  114.          security.checkPropertiesAccess();
  115.       }
  116.  
  117.       props = var0;
  118.    }
  119. }
  120.