/libcore/ojluni/src/main/java/java/net/ |
D | DatagramPacket.java | 69 int length; field in DatagramPacket 87 public DatagramPacket(byte buf[], int offset, int length) { in DatagramPacket() argument 88 setData(buf, offset, length); in DatagramPacket() 103 public DatagramPacket(byte buf[], int length) { in DatagramPacket() argument 104 this (buf, 0, length); in DatagramPacket() 123 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument 125 setData(buf, offset, length); in DatagramPacket() 152 public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) { in DatagramPacket() argument 153 setData(buf, offset, length); in DatagramPacket() 175 public DatagramPacket(byte buf[], int length, in DatagramPacket() argument [all …]
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | BitArray.java | 41 private int length; field in BitArray 56 public BitArray(int length) throws IllegalArgumentException { in BitArray() argument 57 if (length < 0) { in BitArray() 61 this.length = length; in BitArray() 63 repn = new byte[(length + BITS_PER_UNIT - 1)/BITS_PER_UNIT]; in BitArray() 72 public BitArray(int length, byte[] a) throws IllegalArgumentException { in BitArray() argument 73 this(length, a, 0); in BitArray() 83 public BitArray(int length, byte[] a, int ofs) in BitArray() argument 86 if (length < 0) { in BitArray() 89 if ((a.length - ofs) * BITS_PER_UNIT < length) { in BitArray() [all …]
|
/libcore/ojluni/src/main/java/jdk/internal/util/ |
D | ArraysSupport.java | 117 int length, in vectorizedMismatch() argument 127 for (; wi < length >> log2ValuesPerWidth; wi++) { in vectorizedMismatch() 141 int tail = length - (wi << log2ValuesPerWidth); in vectorizedMismatch() 199 public static int vectorizedHashCode(Object array, int fromIndex, int length, int initialValue, in vectorizedHashCode() argument 202 case T_BOOLEAN -> signedHashCode(initialValue, (byte[]) array, fromIndex, length); in vectorizedHashCode() 204 ? utf16hashCode(initialValue, (byte[]) array, fromIndex, length) in vectorizedHashCode() 205 : hashCode(initialValue, (char[]) array, fromIndex, length); in vectorizedHashCode() 206 case T_BYTE -> hashCode(initialValue, (byte[]) array, fromIndex, length); in vectorizedHashCode() 207 case T_SHORT -> hashCode(initialValue, (short[]) array, fromIndex, length); in vectorizedHashCode() 208 case T_INT -> hashCode(initialValue, (int[]) array, fromIndex, length); in vectorizedHashCode() [all …]
|
D | Preconditions.java | 69 int index, int length) { in outOfBoundsCheckIndex() argument 70 return outOfBounds(oobe, "checkIndex", index, length); in outOfBoundsCheckIndex() 75 int fromIndex, int toIndex, int length) { in outOfBoundsCheckFromToIndex() argument 76 return outOfBounds(oobe, "checkFromToIndex", fromIndex, toIndex, length); in outOfBoundsCheckFromToIndex() 81 int fromIndex, int size, int length) { in outOfBoundsCheckFromIndexSize() argument 82 return outOfBounds(oobe, "checkFromIndexSize", fromIndex, size, length); in outOfBoundsCheckFromIndexSize() 87 long index, long length) { in outOfBoundsCheckIndex() argument 88 return outOfBounds(oobe, "checkIndex", index, length); in outOfBoundsCheckIndex() 93 long fromIndex, long toIndex, long length) { in outOfBoundsCheckFromToIndex() argument 94 return outOfBounds(oobe, "checkFromToIndex", fromIndex, toIndex, length); in outOfBoundsCheckFromToIndex() [all …]
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
D | AttributesImpl.java | 62 length = 0; in AttributesImpl() 95 return length; in getLength() 109 if (index >= 0 && index < length) { in getURI() 127 if (index >= 0 && index < length) { in getLocalName() 145 if (index >= 0 && index < length) { in getQName() 163 if (index >= 0 && index < length) { in getType() 180 if (index >= 0 && index < length) { in getValue() 203 int max = length * 5; in getIndex() 222 int max = length * 5; in getIndex() 244 int max = length * 5; in getType() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | System.java | 450 int length); in arraycopy() argument 467 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument 474 if (srcPos < 0 || dstPos < 0 || length < 0 || in arraycopy() 475 srcPos > src.length - length || dstPos > dst.length - length) { in arraycopy() 477 "src.length=" + src.length + " srcPos=" + srcPos + in arraycopy() 478 " dst.length=" + dst.length + " dstPos=" + dstPos + " length=" + length); in arraycopy() 480 if (length <= ARRAYCOPY_SHORT_CHAR_ARRAY_THRESHOLD) { in arraycopy() 482 if (src == dst && srcPos < dstPos && dstPos < srcPos + length) { in arraycopy() 486 for (int i = length - 1; i >= 0; --i) { in arraycopy() 491 for (int i = 0; i < length; ++i) { in arraycopy() [all …]
|
/libcore/ojluni/src/test/java/lang/String/CompactString/ |
D | GetChars.java | 46 new Object[] { STRING_EMPTY, 0, STRING_EMPTY.length(), in provider() 47 new char[STRING_EMPTY.length()], 0, CHAR_ARRAY_EMPTY }, in provider() 48 new Object[] { STRING_L1, 0, STRING_L1.length(), in provider() 49 new char[STRING_L1.length()], 0, CHAR_ARRAY_L1 }, in provider() 50 new Object[] { STRING_L2, 0, STRING_L2.length(), in provider() 51 new char[STRING_L2.length()], 0, CHAR_ARRAY_L2 }, in provider() 52 new Object[] { STRING_L4, 0, STRING_L4.length(), in provider() 53 new char[STRING_L4.length()], 0, CHAR_ARRAY_L4 }, in provider() 54 new Object[] { STRING_LLONG, 0, STRING_LLONG.length(), in provider() 55 new char[STRING_LLONG.length()], 0, CHAR_ARRAY_LLONG }, in provider() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Arrays.java | 107 DualPivotQuicksort.sort(a, 0, 0, a.length); in sort() 130 rangeCheck(a.length, fromIndex, toIndex); in sort() 145 DualPivotQuicksort.sort(a, 0, 0, a.length); in sort() 168 rangeCheck(a.length, fromIndex, toIndex); in sort() 183 DualPivotQuicksort.sort(a, 0, a.length); in sort() 206 rangeCheck(a.length, fromIndex, toIndex); in sort() 221 DualPivotQuicksort.sort(a, 0, a.length); in sort() 244 rangeCheck(a.length, fromIndex, toIndex); in sort() 259 DualPivotQuicksort.sort(a, 0, a.length); in sort() 282 rangeCheck(a.length, fromIndex, toIndex); in sort() [all …]
|
/libcore/luni/src/main/native/ |
D | cbigint.cpp | 52 simpleAddHighPrecision (uint64_t * arg1, int32_t length, uint64_t arg2) in simpleAddHighPrecision() argument 60 else if (length == 1) in simpleAddHighPrecision() 63 while (++arg1[index] == 0 && ++index < length) { in simpleAddHighPrecision() 66 return index == length; in simpleAddHighPrecision() 134 static uint32_t simpleMultiplyHighPrecision(uint64_t* arg1, int32_t length, uint64_t arg2) { in simpleMultiplyHighPrecision() argument 151 while (++index < length); in simpleMultiplyHighPrecision() 157 simpleMultiplyAddHighPrecision (uint64_t * arg1, int32_t length, uint64_t arg2, in simpleMultiplyAddHighPrecision() argument 181 while (++index < length); in simpleMultiplyAddHighPrecision() 195 uint64_t * result, int32_t length) in multiplyHighPrecision() 212 memset (result, 0, sizeof (uint64_t) * length); in multiplyHighPrecision() [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | StringFactory.java | 44 return newStringFromBytes(data, 0, data.length); in newStringFromBytes() 51 return newStringFromUtf16Bytes(data, 0, data.length >>> 1); in newStringFromBytes() 64 return newStringFromBytes(data, high, 0, data.length); in newStringFromBytes() 79 return newStringFromBytes(data, 0, data.length, Charset.forNameUEE(charsetName)); in newStringFromBytes() 84 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes() 85 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes() 89 int length; in newStringFromBytes() local 99 length = byteCount; in newStringFromBytes() 103 length = cb.length(); in newStringFromBytes() 109 return newStringFromChars(value, 0, length); in newStringFromBytes() [all …]
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | CoderResult.java | 96 private final int length; field in CoderResult 98 private CoderResult(int type, int length) { in CoderResult() argument 100 this.length = length; in CoderResult() 110 return isError() ? nm + "[" + length + "]" : nm; in toString() 172 public int length() { in length() method in CoderResult 175 return length; in length() 217 public static CoderResult malformedForLength(int length) { in malformedForLength() argument 218 if (length <= 0) in malformedForLength() 220 if (length <= 4) in malformedForLength() 221 return malformed4[length - 1]; in malformedForLength() [all …]
|
/libcore/ojluni/src/test/java/util/zip/ |
D | ChecksumBase.java | 84 ByteBuffer bb = ByteBuffer.allocateDirect(BYTES_123456789.length); in testDirectByteBuffer() 100 byte[] unaligned_bytes_123456789 = new byte[BYTES_123456789.length + 64]; in testByteArrayOffset() 101 for (int i = 0; i < unaligned_bytes_123456789.length - BYTES_123456789.length; i++) { in testByteArrayOffset() 103 … System.arraycopy(BYTES_123456789, 0, unaligned_bytes_123456789, i, BYTES_123456789.length); in testByteArrayOffset() 104 checksum.update(unaligned_bytes_123456789, i, BYTES_123456789.length); in testByteArrayOffset() 110 byte[] unaligned_bytes_123456789 = new byte[BYTES_123456789.length + 64]; in testDirectByteBufferOffset() 111 for (int i = 0; i < unaligned_bytes_123456789.length - BYTES_123456789.length; i++) { in testDirectByteBufferOffset() 113 ByteBuffer bb = ByteBuffer.allocateDirect(unaligned_bytes_123456789.length); in testDirectByteBufferOffset() 114 … System.arraycopy(BYTES_123456789, 0, unaligned_bytes_123456789, i, BYTES_123456789.length); in testDirectByteBufferOffset() 117 bb.limit(i + BYTES_123456789.length); in testDirectByteBufferOffset() [all …]
|
/libcore/ojluni/src/test/java/util/Arrays/ |
D | Sorting.java | 110 for (int length : lengths) { in testBasic() 111 createData(length); in testBasic() 112 testBasic(length); in testBasic() 116 private void testBasic(int length) { in testBasic() argument 118 testWithInsertionSort(length, random); in testBasic() 119 testWithCheckSum(length, random); in testBasic() 120 testWithScrambling(length, random); in testBasic() 125 for (int length : lengths) { in testCore() 126 createData(length); in testCore() 127 testCore(length); in testCore() [all …]
|
/libcore/ojluni/src/test/java/util/Objects/ |
D | CheckLongIndex.java | 82 for (long length : VALUES) { 84 length >= 0 && 85 index < length; 86 l.add(new Object[]{index, length, withinBounds}); 93 public void testCheckIndex(long index, long length, boolean withinBounds) { 97 apply("checkIndex", List.of(index, length)).getMessage(); 104 … "Index %d is out of bounds of [0, %d), but was reported to be within bounds", index, length)); 111 … "Index %d is within bounds of [0, %d), but was reported to be out of bounds", index, length)); 118 () -> Preconditions.checkIndex(index, length, 119 … assertingOutOfBounds(expectedMessage, "checkIndex", index, length))); [all …]
|
D | CheckIndex.java | 83 for (int length : VALUES) { 85 length >= 0 && 86 index < length; 87 l.add(new Object[]{index, length, withinBounds}); 94 public void testCheckIndex(int index, int length, boolean withinBounds) { 98 apply("checkIndex", List.of(index, length)).getMessage(); 105 … "Index %d is out of bounds of [0, %d), but was reported to be within bounds", index, length)); 112 … "Index %d is within bounds of [0, %d), but was reported to be out of bounds", index, length)); 119 () -> Preconditions.checkIndex(index, length, 120 … assertingOutOfBounds(expectedMessage, "checkIndex", index, length))); [all …]
|
/libcore/ojluni/src/test/java/lang/StringBuffer/ |
D | Supplementary.java | 91 for (int i = 0; i < input.length; i++) { in test1() 99 testCodePoint(At, sb, sb.length()-1, golden1[2][i]); in test1() 105 testCodePoint(At, sb, sb.length()); in test1() 128 for (int i = 0; i < input.length; i++) { in test2() 136 testCodePoint(Before, sb, sb.length(), golden2[2][i]); in test2() 142 testCodePoint(Before, sb, sb.length()+1); in test2() 181 for (int i = 0; i < input.length; i++) { in test3() 189 for (int i = 0; i < testdata1.length; i++) { in test3() 202 for (int i = 0; i < input.length; i++) { in test4() 206 for (int j = 0; j < s.length(); j += Character.charCount(c)) { in test4() [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | HeapCharBuffer.java | 113 super(-1, off, off + len, buf.length, buf, 0); in HeapCharBuffer() 157 public CharBuffer slice(int index, int length) { in slice() argument 158 Objects.checkFromIndexSize(index, length, limit()); in slice() 162 length, in slice() 163 length, in slice() 237 public CharBuffer get(char[] dst, int offset, int length) { in get() argument 239 Objects.checkFromIndexSize(offset, length, dst.length); in get() 241 if (length > limit() - pos) in get() 243 System.arraycopy(hb, ix(pos), dst, offset, length); in get() 244 position(pos + length); in get() [all …]
|
D | ByteBuffer.java | 422 int offset, int length) in wrap() argument 426 return new HeapByteBuffer(array, offset, length); in wrap() 455 return wrap(array, 0, array.length); in wrap() 628 public abstract ByteBuffer slice(int index, int length); in slice() argument 815 public ByteBuffer get(byte[] dst, int offset, int length) { in get() argument 816 Objects.checkFromIndexSize(offset, length, dst.length); in get() 818 if (length > limit() - pos) in get() 821 getArray(pos, dst, offset, length); in get() 823 position(pos + length); in get() 847 return get(dst, 0, dst.length); in get() [all …]
|
D | ByteBufferAsDoubleBuffer.java | 104 public DoubleBuffer slice(int index, int length) { in slice() argument 105 Objects.checkFromIndexSize(index, length, limit()); in slice() 109 length, in slice() 110 length, in slice() 177 public DoubleBuffer get(double[] dst, int off, int length) { in get() argument 178 Objects.checkFromIndexSize(off, length, dst.length); in get() 179 if (length > remaining()) in get() 181 bb.getUnchecked(ix(position), dst, off, length); in get() local 182 position += length; in get() 187 public DoubleBuffer get(int index, double[] dst, int off, int length) { in get() argument [all …]
|
D | ByteBufferAsLongBuffer.java | 104 public LongBuffer slice(int index, int length) { in slice() argument 105 Objects.checkFromIndexSize(index, length, limit()); in slice() 109 length, in slice() 110 length, in slice() 177 public LongBuffer get(long[] dst, int off, int length) { in get() argument 178 Objects.checkFromIndexSize(off, length, dst.length); in get() 179 if (length > remaining()) in get() 181 bb.getUnchecked(ix(position), dst, off, length); in get() local 182 position += length; in get() 187 public LongBuffer get(int index, long[] dst, int off, int length) { in get() argument [all …]
|
D | ByteBufferAsIntBuffer.java | 104 public IntBuffer slice(int index, int length) { in slice() argument 105 Objects.checkFromIndexSize(index, length, limit()); in slice() 109 length, in slice() 110 length, in slice() 177 public IntBuffer get(int[] dst, int off, int length) { in get() argument 178 Objects.checkFromIndexSize(off, length, dst.length); in get() 179 if (length > remaining()) in get() 181 bb.getUnchecked(ix(position), dst, off, length); in get() local 182 position += length; in get() 187 public IntBuffer get(int index, int[] dst, int off, int length) { in get() argument [all …]
|
D | ByteBufferAsShortBuffer.java | 104 public ShortBuffer slice(int index, int length) { in slice() argument 105 Objects.checkFromIndexSize(index, length, limit()); in slice() 109 length, in slice() 110 length, in slice() 177 public ShortBuffer get(short[] dst, int off, int length) { in get() argument 178 Objects.checkFromIndexSize(off, length, dst.length); in get() 179 if (length > remaining()) in get() 181 bb.getUnchecked(ix(position), dst, off, length); in get() local 182 position += length; in get() 187 public ShortBuffer get(int index, short[] dst, int off, int length) { in get() argument [all …]
|
D | ByteBufferAsFloatBuffer.java | 104 public FloatBuffer slice(int index, int length) { in slice() argument 105 Objects.checkFromIndexSize(index, length, limit()); in slice() 109 length, in slice() 110 length, in slice() 177 public FloatBuffer get(float[] dst, int off, int length) { in get() argument 178 Objects.checkFromIndexSize(off, length, dst.length); in get() 179 if (length > remaining()) in get() 181 bb.getUnchecked(ix(position), dst, off, length); in get() local 182 position += length; in get() 187 public FloatBuffer get(int index, float[] dst, int off, int length) { in get() argument [all …]
|
/libcore/ojluni/src/test/java/lang/Character/ |
D | Supplementary.java | 58 int length = test01(cu); in main() local 60 String str = new String(cu, 0, length); in main() 169 if (u.length != 1 || u[0] != i) { in test01() 221 if (u.length != 2 || u[0] != hi || u[1] != lo) { in test01() 258 for (int i = 0; i < cs.length(); i += Character.charCount(ch)) { in test02() 273 for (int i = cs.length(); i > 0; i -= Character.charCount(ch)) { in test02() 297 for (int i = 0; i < a.length; i += Character.charCount(ch)) { in test03() 318 for (int i = a.length; i > 0; i -= Character.charCount(ch)) { in test03() 344 int length = str.length(); in test04() local 347 for (int i = 0; i <= length; i += 99, length -= 29999) { in test04() [all …]
|
/libcore/ojluni/src/test/java/lang/StringBuilder/ |
D | Supplementary.java | 93 for (int i = 0; i < input.length; i++) { in test1() 101 testCodePoint(At, sb, sb.length()-1, golden1[2][i]); in test1() 107 testCodePoint(At, sb, sb.length()); in test1() 130 for (int i = 0; i < input.length; i++) { in test2() 138 testCodePoint(Before, sb, sb.length(), golden2[2][i]); in test2() 144 testCodePoint(Before, sb, sb.length()+1); in test2() 183 for (int i = 0; i < input.length; i++) { in test3() 191 for (int i = 0; i < testdata1.length; i++) { in test3() 204 for (int i = 0; i < input.length; i++) { in test4() 208 for (int j = 0; j < s.length(); j += Character.charCount(c)) { in test4() [all …]
|