src/java.base/share/classes/sun/security/provider/ByteArrayAccess.java

Print this page

        

*** 86,102 **** scaleOK && (byteOrder == ByteOrder.BIG_ENDIAN); } // Return whether this platform supports full speed int/long memory access // at unaligned addresses. - // This code was copied from java.nio.Bits because there is no equivalent - // public API. private static boolean unaligned() { ! String arch = java.security.AccessController.doPrivileged ! (new sun.security.action.GetPropertyAction("os.arch", "")); ! return arch.equals("i386") || arch.equals("x86") || arch.equals("amd64") ! || arch.equals("x86_64"); } /** * byte[] to int[] conversion, little endian byte order. */ --- 86,97 ---- scaleOK && (byteOrder == ByteOrder.BIG_ENDIAN); } // Return whether this platform supports full speed int/long memory access // at unaligned addresses. private static boolean unaligned() { ! return unsafe.unalignedAccess(); } /** * byte[] to int[] conversion, little endian byte order. */