jdk/src/java.base/share/classes/sun/nio/cs/StringUTF16.java
changeset 34535 1c305b7233b3
parent 33663 2cd62a4bd471
equal deleted inserted replaced
34534:0d45108a3e62 34535:1c305b7233b3
    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 }