< prev index next >
src/java.base/share/classes/java/lang/System.java
Print this page
*** 1903,1912 ****
--- 1903,1927 ----
Shutdown.add(slot, registerShutdownInProgress, hook);
}
public String newStringUnsafe(char[] chars) {
return new String(chars, true);
}
+ public String newStringUnsafe(byte[] bytes, byte coder) {
+ return new String(bytes, coder);
+ }
+ public byte stringInitialCoder() {
+ return String.COMPACT_STRINGS ? String.LATIN1 : String.UTF16;
+ }
+ public byte stringMixCoder(byte coder, String s) {
+ return (byte) (coder | s.coder());
+ }
+ public byte[] stringStorageFor(int charLen, byte coder) {
+ return new byte[charLen << coder];
+ }
+ public void stringGetChars(String src, byte[] dst, int dstIdx, byte coder) {
+ src.getBytes(dst, dstIdx, coder);
+ }
public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) {
return new Thread(target, acc);
}
public void invokeFinalize(Object o) throws Throwable {
o.finalize();
< prev index next >