home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / Security / rni / MyRNIObject.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  611 b   |  32 lines

  1. // MyRNIObject.java
  2. //
  3. //
  4. // (C)Copyright 1997-1998 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.