/libcore/ojluni/src/main/java/java/net/ |
D | DatagramPacket.java | 60 int length; field in DatagramPacket 78 public DatagramPacket(byte buf[], int offset, int length) { in DatagramPacket() argument 79 setData(buf, offset, length); in DatagramPacket() 94 public DatagramPacket(byte buf[], int length) { in DatagramPacket() argument 95 this (buf, 0, length); in DatagramPacket() 114 public DatagramPacket(byte buf[], int offset, int length, in DatagramPacket() argument 116 setData(buf, offset, length); in DatagramPacket() 143 public DatagramPacket(byte buf[], int offset, int length, SocketAddress address) { in DatagramPacket() argument 144 setData(buf, offset, length); in DatagramPacket() 166 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() 74 public BitArray(int length, byte[] a) throws IllegalArgumentException { in BitArray() argument 76 if (length < 0) { in BitArray() 79 if (a.length * BITS_PER_UNIT < length) { in BitArray() 84 this.length = length; in BitArray() 86 int repLength = ((length + BITS_PER_UNIT - 1)/BITS_PER_UNIT); in BitArray() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | System.java | 442 int length); in arraycopy() argument 458 public static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument 465 if (srcPos < 0 || dstPos < 0 || length < 0 || in arraycopy() 466 srcPos > src.length - length || dstPos > dst.length - length) { in arraycopy() 468 "src.length=" + src.length + " srcPos=" + srcPos + in arraycopy() 469 " dst.length=" + dst.length + " dstPos=" + dstPos + " length=" + length); in arraycopy() 471 if (length <= ARRAYCOPY_SHORT_CHAR_ARRAY_THRESHOLD) { in arraycopy() 473 if (src == dst && srcPos < dstPos && dstPos < srcPos + length) { in arraycopy() 477 for (int i = length - 1; i >= 0; --i) { in arraycopy() 482 for (int i = 0; i < length; ++i) { in arraycopy() [all …]
|
D | CharSequence.java | 67 int length(); in length() method 135 return cur < length(); in chars() 148 for (; cur < length(); cur++) { in chars() 157 length(), in chars() 183 final int length = length(); in codePoints() local 186 while (i < length) { in codePoints() 188 if (!Character.isHighSurrogate(c1) || i >= length) { in codePoints() 206 return cur < length(); in codePoints() 210 final int length = length(); in codePoints() local 212 if (cur >= length) { in codePoints() [all …]
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
D | AttributesImpl.java | 60 length = 0; in AttributesImpl() 93 return length; in getLength() 107 if (index >= 0 && index < length) { in getURI() 125 if (index >= 0 && index < length) { in getLocalName() 143 if (index >= 0 && index < length) { in getQName() 161 if (index >= 0 && index < length) { in getType() 178 if (index >= 0 && index < length) { in getValue() 201 int max = length * 5; in getIndex() 220 int max = length * 5; in getIndex() 242 int max = length * 5; in getType() [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/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | DateFormatSymbolsTest.java | 121 if (retVal.length != val.length) in test_getAmPmStrings() 123 for (int i = 0; i < val.length; i++) in test_getAmPmStrings() 135 if (retVal.length != val.length) in test_getEras() 137 for (int i = 0; i < val.length; i++) in test_getEras() 151 assertEquals("Returned wrong array: ", val.length, retVal.length); in test_getMonths() 152 for (int i = 0; i < val.length; i++) in test_getMonths() 165 assertEquals("Returned wrong array: ", val.length, retVal.length); in test_getShortMonths() 166 for (int i = 0; i < val.length; i++) in test_getShortMonths() 178 if (retVal.length != val.length) in test_getShortWeekdays() 180 for (int i = 0; i < val.length; i++) in test_getShortWeekdays() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringBuilderTest.java | 28 sb.deleteCharAt(sb.length() - 1); in test_deleteChatAt_lastRange() 56 sb.delete(sb.length() - 3, sb.length()); in test_delete_endsAtLastChar() 71 sb.deleteCharAt(sb.length()); in test_deleteCharAt_boundsChecks() 89 sb.delete(sb.length(), sb.length() + 2); in test_delete_boundsChecks() 90 sb.delete(sb.length(), sb.length()); in test_delete_boundsChecks() 97 sb.delete(sb.length() + 2, sb.length() + 3); in test_delete_boundsChecks() 104 sb.delete(sb.length() + 2, sb.length() + 2); in test_delete_boundsChecks() 111 sb.delete(-1, sb.length() -1); in test_delete_boundsChecks() 119 sb2.delete(0, sb2.length()); in test_delete_boundsChecks() 128 sb.delete(sb.length() - 1 , sb.length() + 2); in test_delete_clampsEnd() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | IOUtils.java | 50 public static byte[] readFully(InputStream is, int length, boolean readAll) in readFully() argument 53 if (length == -1) length = Integer.MAX_VALUE; in readFully() 55 while (pos < length) { in readFully() 57 if (pos >= output.length) { // Only expand when there's no room in readFully() 58 bytesToRead = Math.min(length - pos, output.length + 1024); in readFully() 59 if (output.length < pos + bytesToRead) { in readFully() 63 bytesToRead = output.length - pos; in readFully() 67 if (readAll && length != Integer.MAX_VALUE) { in readFully() 70 if (output.length != pos) { in readFully()
|
/libcore/libart/src/main/java/java/lang/ |
D | StringFactory.java | 46 return newStringFromBytes(data, 0, data.length); in newStringFromBytes() 50 return newStringFromBytes(data, high, 0, data.length); in newStringFromBytes() 65 return newStringFromBytes(data, 0, data.length, Charset.forNameUEE(charsetName)); in newStringFromBytes() 70 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes() 71 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes() 75 int length; in newStringFromBytes() local 175 length = s; in newStringFromBytes() 179 length = s; in newStringFromBytes() 184 length = byteCount; in newStringFromBytes() 188 length = byteCount; in newStringFromBytes() [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | NioBufferIterator.java | 29 private final int length; field in NioBufferIterator 34 NioBufferIterator(MemoryMappedFile file, long address, int length, boolean swap) { in NioBufferIterator() argument 40 if (length < 0) { in NioBufferIterator() 44 if (Long.compareUnsigned(address, MAX_VALID_ADDRESS - length) > 0) { in NioBufferIterator() 46 "length " + length + " would overflow 64-bit address space"); in NioBufferIterator() 48 this.length = length; in NioBufferIterator() 67 checkDstBounds(dstOffset, dst.length, byteCount); in readByteArray() 69 checkReadBounds(position, length, byteCount); in readByteArray() 76 checkReadBounds(position, length, 1); in readByte() 84 checkReadBounds(position, length, SizeOf.INT); in readInt() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerConstructorsTest.java | 54 byte resBytes[] = new byte[rBytes.length]; in testConstructorBytesPositive1() 56 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive1() 70 byte resBytes[] = new byte[rBytes.length]; in testConstructorBytesPositive2() 72 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive2() 86 byte resBytes[] = new byte[rBytes.length]; in testConstructorBytesPositive3() 88 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive3() 102 byte resBytes[] = new byte[rBytes.length]; in testConstructorBytesPositive() 104 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesPositive() 118 byte resBytes[] = new byte[rBytes.length]; in testConstructorBytesNegative1() 120 for(int i = 0; i < resBytes.length; i++) { in testConstructorBytesNegative1() [all …]
|
D | BigIntegerOperateBitsTest.java | 149 byte resBytes[] = new byte[rBytes.length]; in testClearBitZero() 151 for(int i = 0; i < resBytes.length; i++) { in testClearBitZero() 167 byte resBytes[] = new byte[rBytes.length]; in testClearBitZeroOutside1() 169 for(int i = 0; i < resBytes.length; i++) { in testClearBitZeroOutside1() 185 byte resBytes[] = new byte[rBytes.length]; in testClearBitNegativeInside1() 187 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside1() 203 byte resBytes[] = new byte[rBytes.length]; in testClearBitNegativeInside2() 205 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeInside2() 260 byte resBytes[] = new byte[rBytes.length]; in testClearBitNegativeOutside1() 262 for(int i = 0; i < resBytes.length; i++) { in testClearBitNegativeOutside1() [all …]
|
D | BigIntegerAddTest.java | 43 byte resBytes[] = new byte[rBytes.length]; in testCase1() 45 for(int i = 0; i < resBytes.length; i++) { in testCase1() 63 byte resBytes[] = new byte[rBytes.length]; in testCase2() 65 for(int i = 0; i < resBytes.length; i++) { in testCase2() 85 byte resBytes[] = new byte[rBytes.length]; in testCase3() 87 for(int i = 0; i < resBytes.length; i++) { in testCase3() 107 byte resBytes[] = new byte[rBytes.length]; in testCase4() 109 for(int i = 0; i < resBytes.length; i++) { in testCase4() 129 byte resBytes[] = new byte[rBytes.length]; in testCase5() 131 for(int i = 0; i < resBytes.length; i++) { in testCase5() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/ |
D | SplitTest.java | 35 assertEquals(expected.length, results.length); in testSimple() 36 for (int i = 0; i < expected.length; i++) { in testSimple() 48 assertEquals(1, tokens.length); in testSplit1() 51 assertEquals(2, tokens.length); in testSplit1() 55 assertEquals(2, tokens.length); in testSplit1() 59 assertEquals(2, tokens.length); in testSplit1() 63 assertEquals(2, tokens.length); in testSplit1() 67 assertEquals(2, tokens.length); in testSplit1() 74 assertEquals(1, tokens.length); in testSplit1() 77 assertEquals(2, tokens.length); in testSplit1() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StringCaseMappingBenchmark.java | 55 private static String lower(int length) { in lower() argument 56 return makeString(length, "a0b1c2d3e4f5g6h7i8j9klmnopqrstuvwxyz"); in lower() 58 private static String upper(int length) { in upper() argument 59 return makeString(length, "A0B1C2D3E4F5G6H7I8J9KLMNOPQRSTUVWXYZ"); in upper() 61 private static String mixed(int length) { in mixed() argument 62 … return makeString(length, "Aa0Bb1Cc2Dd3Ee4Ff5Gg6Hh7Ii8Jj9KkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"); in mixed() 64 private static String makeString(int length, String alphabet) { in makeString() argument 65 StringBuilder sb = new StringBuilder(length); in makeString() 66 for (int i = 0; i < length; ++i) { in makeString() 67 sb.append(alphabet.charAt(i % alphabet.length())); in makeString() [all …]
|
D | CharsetBenchmark.java | 23 private int length; field in CharsetBenchmark 42 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BString() 49 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BII() 51 new String(bytes, 0, bytes.length); in time_new_String_BII() 56 byte[] bytes = makeBytes(makeString(length)); in time_new_String_BIIString() 58 new String(bytes, 0, bytes.length, name); in time_new_String_BIIString() 63 String string = makeString(length); in time_String_getBytes() 69 private static String makeString(int length) { in makeString() argument 70 StringBuilder result = new StringBuilder(length); in makeString() 71 for (int i = 0; i < length; ++i) { in makeString()
|
/libcore/ojluni/src/main/native/ |
D | Bits.c | 77 jlong srcPos, jlong dstAddr, jlong length) in Java_java_nio_Bits_copyFromShortArray() argument 86 while (length > 0) { in Java_java_nio_Bits_copyFromShortArray() 88 if (length > MBYTE) in Java_java_nio_Bits_copyFromShortArray() 91 size = (size_t)length; in Java_java_nio_Bits_copyFromShortArray() 104 length -= size; in Java_java_nio_Bits_copyFromShortArray() 112 jobject dst, jlong dstPos, jlong length) in Java_java_nio_Bits_copyToShortArray() argument 121 while (length > 0) { in Java_java_nio_Bits_copyToShortArray() 123 if (length > MBYTE) in Java_java_nio_Bits_copyToShortArray() 126 size = (size_t)length; in Java_java_nio_Bits_copyToShortArray() 139 length -= size; in Java_java_nio_Bits_copyToShortArray() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/ |
D | SplitTest.java | 57 assertEquals(expected.length, actual.length); in assertArraysEqual() 58 for (int i = 0; i < expected.length; i++) { in assertArraysEqual() 70 assertEquals(1, tokens.length); in testSplit1() 73 assertEquals(2, tokens.length); in testSplit1() 77 assertEquals(2, tokens.length); in testSplit1() 81 assertEquals(2, tokens.length); in testSplit1() 85 assertEquals(2, tokens.length); in testSplit1() 89 assertEquals(2, tokens.length); in testSplit1() 96 assertEquals(1, tokens.length); in testSplit1() 99 assertEquals(2, tokens.length); in testSplit1() [all …]
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | CoderResult.java | 97 private final int length; field in CoderResult 99 private CoderResult(int type, int length) { in CoderResult() argument 101 this.length = length; in CoderResult() 111 return isError() ? nm + "[" + length + "]" : nm; in toString() 173 public int length() { in length() method in CoderResult 176 return length; in length() 235 public static CoderResult malformedForLength(int length) { in malformedForLength() argument 236 return malformedCache.get(length); in malformedForLength() 254 public static CoderResult unmappableForLength(int length) { in unmappableForLength() argument 255 return unmappableCache.get(length); in unmappableForLength() [all …]
|
/libcore/luni/src/test/java/libcore/io/ |
D | MemoryTest.java | 27 int[] swappedValues = new int[values.length]; in testSetIntArray() 28 for (int i = 0; i < values.length; ++i) { in testSetIntArray() 34 byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, scale * values.length + 1); in testSetIntArray() 42 Memory.pokeIntArray(ptr, values, 0, values.length, false); in testSetIntArray() 47 Memory.pokeIntArray(ptr, values, 0, values.length, true); in testSetIntArray() 52 for (int i = 0; i < values.length; ++i) { in testSetIntArray() 61 for (int i = 0; i < expectedValues.length; ++i) { in assertIntsEqual() 68 long[] swappedValues = new long[values.length]; in testSetLongArray() 69 for (int i = 0; i < values.length; ++i) { in testSetLongArray() 75 byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, scale * values.length + 1); in testSetLongArray() [all …]
|
/libcore/luni/src/main/java/libcore/internal/ |
D | StringPool.java | 28 private static boolean contentEquals(String s, char[] chars, int start, int length) { in contentEquals() argument 29 if (s.length() != length) { in contentEquals() 32 for (int i = 0; i < length; i++) { in contentEquals() 43 public String get(char[] array, int start, int length) { in get() argument 46 for (int i = start; i < start + length; i++) { in get() 53 int index = hashCode & (pool.length - 1); in get() 56 if (pooled != null && contentEquals(pooled, array, start, length)) { in get() 60 String result = new String(array, start, length); in get()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 63 for (int i = 0; i < neg.length; i++) { in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII() 71 for (int i = 0; i < neg.length; i++) { in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII() 100 for (int i = 0; i < enS.length; i++) { in test_bytesConsumed() 101 for (int j = 0; j < enHS.length; j++) { in test_bytesConsumed() 102 for (int n = 0; n < pos.length; n++) { in test_bytesConsumed() 103 for (int l = 0; l < pos.length; l++) { in test_bytesConsumed() 123 for (int i = 0; i < enS.length; i++) { in test_bytesProduced() 124 for (int j = 0; j < enHS.length; j++) { in test_bytesProduced() 125 for (int n = 0; n < pos.length; n++) { in test_bytesProduced() 126 for (int l = 0; l < pos.length; ++l) { in test_bytesProduced() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Arrays.java | 161 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 185 rangeCheck(a.length, fromIndex, toIndex); in sort() 201 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 225 rangeCheck(a.length, fromIndex, toIndex); in sort() 241 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 265 rangeCheck(a.length, fromIndex, toIndex); in sort() 281 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 305 rangeCheck(a.length, fromIndex, toIndex); in sort() 321 DualPivotQuicksort.sort(a, 0, a.length - 1); in sort() 345 rangeCheck(a.length, fromIndex, toIndex); in sort() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | GZIPInputStreamTest.java | 108 assertEquals(data.length, totalSkipped); in testSkip() 114 final int length = HELLO_WORLD_GZIPPED.length; in testMultipleMembers() local 115 byte[] data = new byte[length * 2]; in testMultipleMembers() 116 System.arraycopy(HELLO_WORLD_GZIPPED, 0, data, 0, length); in testMultipleMembers() 117 System.arraycopy(HELLO_WORLD_GZIPPED, 0, data, length, length); in testMultipleMembers() 124 final int length = HELLO_WORLD_GZIPPED.length; in testTrailingNonGzipData() local 126 byte[] data = new byte[length + 50]; in testTrailingNonGzipData() 127 System.arraycopy(HELLO_WORLD_GZIPPED, 0, data, 0, length); in testTrailingNonGzipData() 138 final int length = HELLO_WORLD_GZIPPED.length; in testTrailingHeaderAndPartialMember() local 141 byte[] data = new byte[length + 10]; in testTrailingHeaderAndPartialMember() [all …]
|