Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 11 java.base.jmod - Base Module
JDK 11 java.base.jmod is the JMOD file for JDK 11 Base module.
JDK 11 Base module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.base.jmod.
JDK 11 Base module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Base module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.base.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ java/nio/BufferMismatch.java
/* * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.nio; import jdk.internal.util.ArraysSupport; /** * Mismatch methods for buffers */ final class BufferMismatch { static int mismatch(ByteBuffer a, int aOff, ByteBuffer b, int bOff, int length) { int i = 0; if (length > 7) { if (a.get(aOff) != b.get(bOff)) return 0; i = ArraysSupport.vectorizedMismatch( a.base(), a.address + aOff, b.base(), b.address + bOff, length, ArraysSupport.LOG2_ARRAY_BYTE_INDEX_SCALE); if (i >= 0) return i; i = length - ~i; } for (; i < length; i++) { if (a.get(aOff + i) != b.get(bOff + i)) return i; } return -1; } static int mismatch(CharBuffer a, int aOff, CharBuffer b, int bOff, int length) { int i = 0; // Ensure only heap or off-heap buffer instances use the // vectorized mismatch. If either buffer is a StringCharBuffer // (order is null) then the slow path is taken if (length > 3 && a.charRegionOrder() == b.charRegionOrder() && a.charRegionOrder() != null && b.charRegionOrder() != null) { if (a.get(aOff) != b.get(bOff)) return 0; i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_CHAR_INDEX_SCALE); if (i >= 0) return i; i = length - ~i; } for (; i < length; i++) { if (a.get(aOff + i) != b.get(bOff + i)) return i; } return -1; } static int mismatch(ShortBuffer a, int aOff, ShortBuffer b, int bOff, int length) { int i = 0; if (length > 3 && a.order() == b.order()) { if (a.get(aOff) != b.get(bOff)) return 0; i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_SHORT_INDEX_SCALE); if (i >= 0) return i; i = length - ~i; } for (; i < length; i++) { if (a.get(aOff + i) != b.get(bOff + i)) return i; } return -1; } static int mismatch(IntBuffer a, int aOff, IntBuffer b, int bOff, int length) { int i = 0; if (length > 1 && a.order() == b.order()) { if (a.get(aOff) != b.get(bOff)) return 0; i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_INT_INDEX_SCALE); if (i >= 0) return i; i = length - ~i; } for (; i < length; i++) { if (a.get(aOff + i) != b.get(bOff + i)) return i; } return -1; } static int mismatch(FloatBuffer a, int aOff, FloatBuffer b, int bOff, int length) { int i = 0; if (length > 1 && a.order() == b.order()) { if (Float.floatToRawIntBits(a.get(aOff)) == Float.floatToRawIntBits(b.get(bOff))) { i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_FLOAT_INDEX_SCALE); } // Mismatched if (i >= 0) { // Check if mismatch is not associated with two NaN values; and // is not associated with +0 and -0 float av = a.get(aOff + i); float bv = b.get(bOff + i); if (av != bv && (!Float.isNaN(av) || !Float.isNaN(bv))) return i; // Fall back to slow mechanism // ISSUE: Consider looping over vectorizedMismatch adjusting ranges // However, requires that returned value be relative to input ranges i++; } // Matched else { i = length - ~i; } } for (; i < length; i++) { float av = a.get(aOff + i); float bv = b.get(bOff + i); if (av != bv && (!Float.isNaN(av) || !Float.isNaN(bv))) return i; } return -1; } static int mismatch(LongBuffer a, int aOff, LongBuffer b, int bOff, int length) { int i = 0; if (length > 0 && a.order() == b.order()) { if (a.get(aOff) != b.get(bOff)) return 0; i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_LONG_INDEX_SCALE); return i >= 0 ? i : -1; } for (; i < length; i++) { if (a.get(aOff + i) != b.get(bOff + i)) return i; } return -1; } static int mismatch(DoubleBuffer a, int aOff, DoubleBuffer b, int bOff, int length) { int i = 0; if (length > 0 && a.order() == b.order()) { if (Double.doubleToRawLongBits(a.get(aOff)) == Double.doubleToRawLongBits(b.get(bOff))) { i = ArraysSupport.vectorizedMismatch( a.base(), a.address + (aOff << ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE), b.base(), b.address + (bOff << ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE), length, ArraysSupport.LOG2_ARRAY_DOUBLE_INDEX_SCALE); } // Mismatched if (i >= 0) { // Check if mismatch is not associated with two NaN values; and // is not associated with +0 and -0 double av = a.get(aOff + i); double bv = b.get(bOff + i); if (av != bv && (!Double.isNaN(av) || !Double.isNaN(bv))) return i; // Fall back to slow mechanism // ISSUE: Consider looping over vectorizedMismatch adjusting ranges // However, requires that returned value be relative to input ranges i++; } // Matched else { return -1; } } for (; i < length; i++) { double av = a.get(aOff + i); double bv = b.get(bOff + i); if (av != bv && (!Double.isNaN(av) || !Double.isNaN(bv))) return i; } return -1; } }
⏎ java/nio/BufferMismatch.java
Or download all of them as a single archive file:
File name: java.base-11.0.1-src.zip File size: 8740354 bytes Release date: 2018-11-04 Download
2020-05-29, 227442👍, 0💬
Popular Posts:
How to download and install iText7-Core-7.1.4.zip? iText7-Core-7.1.4.zip is the binary package of iT...
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
How to download and install ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is a Java 5 J...
JAX-RPC is an API for building Web services and clients that used remote procedure calls (RPC) and X...