< prev index next >

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

Print this page

        

*** 28,37 **** --- 28,38 ---- import java.lang.annotation.Annotation; import java.lang.module.ModuleDescriptor; import java.lang.reflect.Executable; import java.lang.reflect.Method; import java.net.URI; + import java.nio.charset.CharacterCodingException; import java.nio.charset.Charset; import java.security.AccessControlContext; import java.security.ProtectionDomain; import java.util.Iterator; import java.util.List;
*** 266,276 **** * @param bytes the byte array source * @param cs the Charset * @return the newly created string * @throws IllegalArgumentException for malformed or unmappable bytes */ ! String newStringNoRepl(byte[] bytes, Charset cs); /** * Encode the given string into a sequence of bytes using the specified Charset. * * This method avoids copying the String's internal representation if the input --- 267,277 ---- * @param bytes the byte array source * @param cs the Charset * @return the newly created string * @throws IllegalArgumentException for malformed or unmappable bytes */ ! String newStringNoRepl(byte[] bytes, Charset cs) throws CharacterCodingException; /** * Encode the given string into a sequence of bytes using the specified Charset. * * This method avoids copying the String's internal representation if the input
*** 282,292 **** * @param s the string to encode * @param cs the charset * @return the encoded bytes * @throws IllegalArgumentException for malformed input or unmappable characters */ ! byte[] getBytesNoRepl(String s, Charset cs); /** * Returns a new string by decoding from the given utf8 bytes array. * * @param off the index of the first byte to decode --- 283,293 ---- * @param s the string to encode * @param cs the charset * @return the encoded bytes * @throws IllegalArgumentException for malformed input or unmappable characters */ ! byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException; /** * Returns a new string by decoding from the given utf8 bytes array. * * @param off the index of the first byte to decode
< prev index next >