< prev index next >

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

Print this page




 288     byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
 289 
 290     /**
 291      * Returns a new string by decoding from the given utf8 bytes array.
 292      *
 293      * @param off the index of the first byte to decode
 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 }


 288     byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
 289 
 290     /**
 291      * Returns a new string by decoding from the given utf8 bytes array.
 292      *
 293      * @param off the index of the first byte to decode
 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 }
< prev index next >