/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() 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 …]
|
D | DerValue.java | 73 private int length; field in DerValue 218 for (int i = 0; i < value.length(); i++) { in DerValue() 246 length = data.length; in DerValue() 263 length = DerInputStream.getLength(lenByte, in); in DerValue() 264 if (length == -1) { // indefinite length encoding found in DerValue() 279 length = DerInputStream.getLength(inbuf); in DerValue() 281 buffer.truncate(length); in DerValue() 286 in.skip(length + offset); in DerValue() 290 buffer.truncate(length); in DerValue() 293 in.skip(length); in DerValue() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | System.java | 442 int length); in arraycopy() argument 459 private static void arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) { in arraycopy() argument 466 if (srcPos < 0 || dstPos < 0 || length < 0 || in arraycopy() 467 srcPos > src.length - length || dstPos > dst.length - length) { in arraycopy() 469 "src.length=" + src.length + " srcPos=" + srcPos + in arraycopy() 470 " dst.length=" + dst.length + " dstPos=" + dstPos + " length=" + length); in arraycopy() 472 if (length <= ARRAYCOPY_SHORT_CHAR_ARRAY_THRESHOLD) { in arraycopy() 474 if (src == dst && srcPos < dstPos && dstPos < srcPos + length) { in arraycopy() 478 for (int i = length - 1; i >= 0; --i) { in arraycopy() 483 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 | 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/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/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 …]
|
D | BigIntegerSubtractTest.java | 44 byte resBytes[] = new byte[rBytes.length]; in testCase1() 46 for(int i = 0; i < resBytes.length; i++) { in testCase1() 65 byte resBytes[] = new byte[rBytes.length]; in testCase2() 67 for(int i = 0; i < resBytes.length; i++) { in testCase2() 87 byte resBytes[] = new byte[rBytes.length]; in testCase3() 89 for(int i = 0; i < resBytes.length; i++) { in testCase3() 109 byte resBytes[] = new byte[rBytes.length]; in testCase4() 111 for(int i = 0; i < resBytes.length; i++) { in testCase4() 130 byte resBytes[] = new byte[rBytes.length]; in testCase5() 132 for(int i = 0; i < resBytes.length; i++) { in testCase5() [all …]
|
D | BigIntegerDivideTest.java | 75 byte resBytes[] = new byte[rBytes.length]; in testCase3() 77 for(int i = 0; i < resBytes.length; i++) { in testCase3() 95 byte resBytes[] = new byte[rBytes.length]; in testCase4() 97 for(int i = 0; i < resBytes.length; i++) { in testCase4() 116 byte resBytes[] = new byte[rBytes.length]; in testCase5() 118 for(int i = 0; i < resBytes.length; i++) { in testCase5() 137 byte resBytes[] = new byte[rBytes.length]; in testCase6() 139 for(int i = 0; i < resBytes.length; i++) { in testCase6() 157 byte resBytes[] = new byte[rBytes.length]; in testCase7() 159 for(int i = 0; i < resBytes.length; i++) { in testCase7() [all …]
|
D | BigIntegerMultiplyTest.java | 43 byte resBytes[] = new byte[rBytes.length]; in testCase1() 45 for(int i = 0; i < resBytes.length; i++) { in testCase1() 64 byte resBytes[] = new byte[rBytes.length]; in testCase2() 66 for(int i = 0; i < resBytes.length; i++) { in testCase2() 86 byte resBytes[] = new byte[rBytes.length]; in testCase3() 88 for(int i = 0; i < resBytes.length; i++) { in testCase3() 108 byte resBytes[] = new byte[rBytes.length]; in testCase4() 110 for(int i = 0; i < resBytes.length; i++) { in testCase4() 131 byte resBytes[] = new byte[rBytes.length]; in testCase5() 133 for(int i = 0; i < resBytes.length; i++) { in testCase5() [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() 70 checkArrayBounds(arrayOffset, bytes.length, byteCount); in readByteArray() 72 checkReadBounds(position, length, byteCount); in readByteArray() 80 checkReadBounds(position, length, 1); in readByte() 89 checkReadBounds(position, length, Integer.BYTES); in readInt() [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() 78 if ((offset | byteCount) < 0 || byteCount > data.length - offset) { in newStringFromBytes() 79 throw new StringIndexOutOfBoundsException(data.length, offset, byteCount); in newStringFromBytes() 83 int length; in newStringFromBytes() local 222 length = s; in newStringFromBytes() 226 length = s; in newStringFromBytes() 231 length = byteCount; in newStringFromBytes() 235 length = byteCount; in newStringFromBytes() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Arrays.java | 147 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 171 rangeCheck(a.length, fromIndex, toIndex); in sort() 187 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 211 rangeCheck(a.length, fromIndex, toIndex); in sort() 227 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 251 rangeCheck(a.length, fromIndex, toIndex); in sort() 267 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0); in sort() 291 rangeCheck(a.length, fromIndex, toIndex); in sort() 307 DualPivotQuicksort.sort(a, 0, a.length - 1); in sort() 331 rangeCheck(a.length, fromIndex, toIndex); in sort() [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/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/sun/security/x509/ |
D | IPAddressName.java | 97 if (address.length == 4 || address.length == 8) { in IPAddressName() 99 } else if (address.length == 16 || address.length == 32) { in IPAddressName() 128 if (name == null || name.length() == 0) { in IPAddressName() 131 if (name.charAt(name.length() - 1) == '/') { in IPAddressName() 265 if (address.length == 8) { in getName() 276 if (address.length == 32) { in getName() 325 if (other.length != address.length) in equals() 328 if (address.length == 8 || address.length == 32) { in equals() 331 int maskLen = address.length/2; in equals() 340 for (int i=maskLen; i < address.length; i++) in equals() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
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/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 …]
|
/libcore/luni/src/test/java/libcore/libcore/io/ |
D | MemoryTest.java | 29 int[] swappedValues = new int[values.length]; in testSetIntArray() 30 for (int i = 0; i < values.length; ++i) { in testSetIntArray() 36 byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, scale * values.length + 1); in testSetIntArray() 44 Memory.pokeIntArray(ptr, values, 0, values.length, false); in testSetIntArray() 49 Memory.pokeIntArray(ptr, values, 0, values.length, true); in testSetIntArray() 54 for (int i = 0; i < values.length; ++i) { in testSetIntArray() 63 for (int i = 0; i < expectedValues.length; ++i) { in assertIntsEqual() 70 long[] swappedValues = new long[values.length]; in testSetLongArray() 71 for (int i = 0; i < values.length; ++i) { in testSetLongArray() 77 byte[] array = (byte[]) runtime.newNonMovableArray(byte.class, scale * values.length + 1); in testSetLongArray() [all …]
|