home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 39 / IOPROG_39.ISO / SOFT / sdkjava40.exe / data1.cab / fg_Samples / Samples / Security / rni / MyRNIObject.java < prev    next >
Encoding:
Java Source  |  2000-05-04  |  615 b   |  32 lines

  1. // MyRNIObject.java
  2. //
  3. //
  4. // (C) Copyright 1995 - 1999 Microsoft Corporation.  All rights reserved.
  5. //
  6.  
  7. package rnisamp;
  8.  
  9.  
  10. public class MyRNIObject
  11. {
  12.     public byte[] JavaCheckedLoad (String filename)
  13.     {
  14.         SecurityManager security = System.getSecurityManager();
  15.         if (security != null)
  16.             security.checkRead(filename);
  17.  
  18.         return JavaCheckedLoad0(filename);
  19.     }
  20.  
  21.     public native byte[] RNICheckedLoad (String filename);
  22.  
  23.  
  24.     private native byte[] JavaCheckedLoad0 (String filename);
  25.  
  26.     static
  27.     {
  28.         System.loadLibrary("rnisamp");
  29.     }
  30. }
  31.  
  32.