equal
deleted
inserted
replaced
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.nio.cs; |
26 package sun.nio.cs; |
27 |
27 |
28 import static sun.misc.Unsafe.ARRAY_BYTE_BASE_OFFSET; |
28 import static jdk.internal.misc.Unsafe.ARRAY_BYTE_BASE_OFFSET; |
29 import static sun.misc.Unsafe.ARRAY_BYTE_INDEX_SCALE; |
29 import static jdk.internal.misc.Unsafe.ARRAY_BYTE_INDEX_SCALE; |
30 |
30 |
31 class StringUTF16 { |
31 class StringUTF16 { |
32 |
32 |
33 public static char getChar(byte[] val, int index) { |
33 public static char getChar(byte[] val, int index) { |
34 return unsafe.getChar(val, |
34 return unsafe.getChar(val, |
35 ARRAY_BYTE_BASE_OFFSET + ARRAY_BYTE_INDEX_SCALE * index * 2L); |
35 ARRAY_BYTE_BASE_OFFSET + ARRAY_BYTE_INDEX_SCALE * index * 2L); |
36 } |
36 } |
37 |
37 |
38 private static final sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); |
38 private static final jdk.internal.misc.Unsafe unsafe = jdk.internal.misc.Unsafe.getUnsafe(); |
39 } |
39 } |