< prev index next >

src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java

Print this page
rev 55657 : 8227587: Add internal privileged System.loadLibrary
Reviewed-by: rriggs
   1 /*
   2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 294      * @param len the number of bytes to decode
 295      * @return the newly created string
 296      * @throws IllegalArgumentException for malformed or unmappable bytes.
 297      */
 298     String newStringUTF8NoRepl(byte[] bytes, int off, int len);
 299 
 300     /**
 301      * Encode the given string into a sequence of bytes using utf8.
 302      *
 303      * @param s the string to encode
 304      * @return the encoded bytes in utf8
 305      * @throws IllegalArgumentException for malformed surrogates
 306      */
 307     byte[] getBytesUTF8NoRepl(String s);
 308 
 309     /**
 310      * Set the cause of Throwable
 311      * @param cause set t's cause to new value
 312      */
 313     void setCause(Throwable t, Throwable cause);






 314 }
   1 /*
   2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 294      * @param len the number of bytes to decode
 295      * @return the newly created string
 296      * @throws IllegalArgumentException for malformed or unmappable bytes.
 297      */
 298     String newStringUTF8NoRepl(byte[] bytes, int off, int len);
 299 
 300     /**
 301      * Encode the given string into a sequence of bytes using utf8.
 302      *
 303      * @param s the string to encode
 304      * @return the encoded bytes in utf8
 305      * @throws IllegalArgumentException for malformed surrogates
 306      */
 307     byte[] getBytesUTF8NoRepl(String s);
 308 
 309     /**
 310      * Set the cause of Throwable
 311      * @param cause set t's cause to new value
 312      */
 313     void setCause(Throwable t, Throwable cause);
 314 
 315     /**
 316      * Privileged System.loadLibrary
 317      * @param library name of the library to load
 318      */
 319     void loadLibrary(String library);
 320 }
< prev index next >