293 * 294 * @param off the index of the first byte to decode 295 * @param len the number of bytes to decode 296 * @return the newly created string 297 * @throws IllegalArgumentException for malformed or unmappable bytes. 298 */ 299 String newStringUTF8NoRepl(byte[] bytes, int off, int len); 300 301 /** 302 * Encode the given string into a sequence of bytes using utf8. 303 * 304 * @param s the string to encode 305 * @return the encoded bytes in utf8 306 * @throws IllegalArgumentException for malformed surrogates 307 */ 308 byte[] getBytesUTF8NoRepl(String s); 309 310 //Panama 311 312 /** 313 * Panama: find a native library. 314 * @param lookup the lookup object. 315 * @param libname the name of the library. 316 * @return the found library 317 * @throws UnsatisfiedLinkError if either the libname argument 318 * contains a file path, the native library is not statically 319 * linked with the VM, or the library cannot be mapped to a 320 * native library image by the host system. 321 */ 322 Library findLibrary(MethodHandles.Lookup lookup, String libname); 323 324 /** 325 * Panama: lookup default library 326 * @return defauult library. 327 */ 328 Library defaultLibrary(); 329 } | 293 * 294 * @param off the index of the first byte to decode 295 * @param len the number of bytes to decode 296 * @return the newly created string 297 * @throws IllegalArgumentException for malformed or unmappable bytes. 298 */ 299 String newStringUTF8NoRepl(byte[] bytes, int off, int len); 300 301 /** 302 * Encode the given string into a sequence of bytes using utf8. 303 * 304 * @param s the string to encode 305 * @return the encoded bytes in utf8 306 * @throws IllegalArgumentException for malformed surrogates 307 */ 308 byte[] getBytesUTF8NoRepl(String s); 309 310 //Panama 311 312 /** 313 * Panama: load a native library. 314 * @param lookup the lookup object. 315 * @param libname the name of the library. 316 * @return the found library 317 * @throws UnsatisfiedLinkError if either the libname argument 318 * contains a file path, the native library is not statically 319 * linked with the VM, or the library cannot be mapped to a 320 * native library image by the host system. 321 */ 322 Library loadLibrary(MethodHandles.Lookup lookup, String libname); 323 324 /** 325 * Panama: load a native library. 326 * @param lookup the lookup object. 327 * @param libname the absolute path of the library. 328 * @return the loaded library 329 * @throws UnsatisfiedLinkError if either the libname argument is not an 330 * absolute path name, the native library is not statically 331 * linked with the VM, or the library cannot be mapped to 332 * a native library image by the host system. 333 */ 334 Library load(MethodHandles.Lookup lookup, String libname); 335 336 /** 337 * Panama: lookup default library 338 * @return defauult library. 339 */ 340 Library defaultLibrary(); 341 } |