/libcore/luni/src/main/native/ |
D | android_system_OsConstants.cpp | 54 static void initConstant(JNIEnv* env, jclass c, const char* fieldName, int value) { in initConstant() argument 55 jfieldID field = env->GetStaticFieldID(c, fieldName, "I"); in initConstant() 56 env->SetStaticIntField(c, field, value); in initConstant() 59 static void OsConstants_initConstants(JNIEnv* env, jclass c) { in OsConstants_initConstants() argument 60 initConstant(env, c, "AF_INET", AF_INET); in OsConstants_initConstants() 61 initConstant(env, c, "AF_INET6", AF_INET6); in OsConstants_initConstants() 62 initConstant(env, c, "AF_PACKET", AF_PACKET); in OsConstants_initConstants() 63 initConstant(env, c, "AF_NETLINK", AF_NETLINK); in OsConstants_initConstants() 64 initConstant(env, c, "AF_UNIX", AF_UNIX); in OsConstants_initConstants() 65 initConstant(env, c, "AF_UNSPEC", AF_UNSPEC); in OsConstants_initConstants() [all …]
|
/libcore/ojluni/src/main/native/ |
D | openjdksub.mk | 8 java_util_zip_ZipFile.c \ 9 java_util_zip_Inflater.c \ 10 java_util_zip_Deflater.c \ 11 java_util_zip_CRC32.c \ 12 Adler32.c \ 13 zip_util.c \ 14 jni_util.c \ 15 jni_util_md.c \ 16 io_util.c \ 17 canonicalize_md.c \ [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | StreamTokenizer.java | 533 int c = peekc; in nextToken() local 534 if (c < 0) in nextToken() 535 c = NEED_CHAR; in nextToken() 536 if (c == SKIP_LF) { in nextToken() 537 c = read(); in nextToken() 538 if (c < 0) in nextToken() 540 if (c == '\n') in nextToken() 541 c = NEED_CHAR; in nextToken() 543 if (c == NEED_CHAR) { in nextToken() 544 c = read(); in nextToken() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | CollatorTest.java | 27 Collator c = Collator.getInstance(Locale.GERMAN); in test_clone() local 28 Collator c2 = (Collator) c.clone(); in test_clone() 29 assertTrue("Clones answered false to equals", c.equals(c2)); in test_clone() 30 assertTrue("Clones were equivalent", c != c2); in test_clone() 34 Collator c = Collator.getInstance(Locale.FRENCH); in test_compareLjava_lang_ObjectLjava_lang_Object() local 37 c.setStrength(Collator.IDENTICAL); in test_compareLjava_lang_ObjectLjava_lang_Object() 40 assertTrue("a) Failed on primary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 43 assertTrue("a) Failed on secondary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 46 assertTrue("a) Failed on tertiary difference", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() 49 assertTrue("a) Failed on identical", c.compare(o, o2) < 0); in test_compareLjava_lang_ObjectLjava_lang_Object() [all …]
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
D | SSLSessionContextTest.java | 32 public static final void assertSSLSessionContextSize(int expected, TestSSLContext c) { in assertSSLSessionContextSize() argument 34 c.clientContext.getClientSessionContext(), in assertSSLSessionContextSize() 35 c.serverContext.getServerSessionContext()); in assertSSLSessionContextSize() 37 c.serverContext.getClientSessionContext(), in assertSSLSessionContextSize() 38 c.clientContext.getServerSessionContext()); in assertSSLSessionContextSize() 60 TestSSLContext c = TestSSLContext.create(); in test_SSLSessionContext_getIds() local 61 assertSSLSessionContextSize(0, c); in test_SSLSessionContext_getIds() 62 c.close(); in test_SSLSessionContext_getIds() 65 assertSSLSessionContextSize(1, s.c); in test_SSLSessionContext_getIds() 66 Enumeration clientIds = s.c.clientContext.getClientSessionContext().getIds(); in test_SSLSessionContext_getIds() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
D | CipherTest.java | 324 Cipher c = Cipher.getInstance("DESEDE/CBC/PKCS5Padding"); in test_update$BII() local 336 c.init(Cipher.DECRYPT_MODE, k, iv); in test_update$BII() 348 byte[] output = c.update(input, 0, bytesRead); in test_update$BII() 355 byte[] output = c.doFinal(); in test_update$BII() 382 Cipher c = Cipher.getInstance("DESEDE/CBC/PKCS5Padding"); in test_doFinal() local 394 c.init(Cipher.ENCRYPT_MODE, k, iv); in test_doFinal() 406 byte[] output = c.update(input, 0, bytesRead); in test_doFinal() 412 byte[] output = c.doFinal(); in test_doFinal() 429 Cipher c = Cipher.getInstance("DES/CBC/NoPadding"); in test_doFinal() local 430 c.init(Cipher.ENCRYPT_MODE, CIPHER_KEY_DES, ap); in test_doFinal() [all …]
|
D | NullCipherTest.java | 41 private Cipher c; field in NullCipherTest 45 c = new NullCipher(); in setUp() 49 c.getAlgorithm(); in testGetAlgorithm() 53 assertEquals("Incorrect BlockSize", 1, c.getBlockSize()); in testGetBlockSize() 57 assertEquals("Incorrect OutputSize", 111, c.getOutputSize(111)); in testGetOutputSize() 61 assertTrue("Incorrect IV", Arrays.equals(c.getIV(), new byte[8])); in testGetIV() 65 assertNull("Incorrect Parameters", c.getParameters()); in testGetParameters() 69 assertNull("Incorrect ExemptionMechanism", c.getExemptionMechanism()); in testGetExemptionMechanism() 76 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], "algorithm")); in testInitintKey() 84 c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(new byte[1], in testInitintKeySecureRandom() [all …]
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleUtils.java | 77 static char toUpper(char c) { in toUpper() argument 78 return isLower(c) ? (char)(c - 0x20) : c; in toUpper() 81 static char toLower(char c) { in toLower() argument 82 return isUpper(c) ? (char)(c + 0x20) : c; in toLower() 102 char c = s.charAt(i); in toLowerString() local 103 buf[i] = (i < idx) ? c : toLower(c); in toLowerString() 122 char c = s.charAt(i); in toUpperString() local 123 buf[i] = (i < idx) ? c : toUpper(c); in toUpperString() 147 char c = s.charAt(i); in toTitleString() local 149 buf[i] = toUpper(c); in toTitleString() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | StringTokenizer.java | 149 int c; in setMaxDelimCodePoint() local 151 for (int i = 0; i < delimiters.length(); i += Character.charCount(c)) { in setMaxDelimCodePoint() 152 c = delimiters.charAt(i); in setMaxDelimCodePoint() 153 if (c >= Character.MIN_HIGH_SURROGATE && c <= Character.MAX_LOW_SURROGATE) { in setMaxDelimCodePoint() 154 c = delimiters.codePointAt(i); in setMaxDelimCodePoint() 157 if (m < c) in setMaxDelimCodePoint() 158 m = c; in setMaxDelimCodePoint() 165 for (int i = 0, j = 0; i < count; i++, j += Character.charCount(c)) { in setMaxDelimCodePoint() 166 c = delimiters.codePointAt(j); in setMaxDelimCodePoint() 167 delimiterCodePoints[i] = c; in setMaxDelimCodePoint() [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | Base64.java | 129 byte c = getNextByte(in, pos, inLength); in decode() 130 if (c == END_OF_INPUT || c == PAD_AS_BYTE) { in decode() 135 return (c == END_OF_INPUT) ? output.toByteArray() : null; in decode() 140 if (c == END_OF_INPUT) { in decode() 146 c = getNextByte(in, pos, inLength); in decode() 147 if (c == END_OF_INPUT) { in decode() 151 if (c == PAD_AS_BYTE) { in decode() 163 if (c == PAD_AS_BYTE) { in decode() 173 byteTripletAsInt += (c & 0xff); in decode() 208 byte c = base64AlphabetToNumericalValue(in[pos[0]]); in getNextByte() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | CharacterImplTest.java | 25 for (char c = '\u0000'; c < 128; c++) { in test_valueOfC() 26 Character e = new Character(c); in test_valueOfC() 27 Character a = Character.valueOf(c); in test_valueOfC() 31 assertSame(Character.valueOf(c), Character.valueOf(c)); in test_valueOfC() 34 for (int c = 128; c <= Character.MAX_VALUE; c++) { in test_valueOfC() 35 assertEquals(new Character((char) c), Character.valueOf((char) c)); in test_valueOfC()
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | AVA.java | 179 int c; in AVA() local 186 c = readChar(in, "Incorrect AVA format"); in AVA() 187 if (c == '=') { in AVA() 190 temp.append((char)c); in AVA() 203 c = in.read(); in AVA() 204 if (c == ' ') { in AVA() 211 c = in.read(); in AVA() 212 } while ((c == ' ') || (c == '\n')); in AVA() 214 if (c == -1) { in AVA() 220 if (c == '#') { in AVA() [all …]
|
/libcore/luni/src/main/java/libcore/net/ |
D | UriCodec.java | 45 protected abstract boolean isRetained(char c); in isRetained() argument 47 private static boolean isWhitelisted(char c) { in isWhitelisted() argument 48 return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9'); in isWhitelisted() 51 private boolean isWhitelistedOrRetained(char c) { in isWhitelistedOrRetained() argument 52 return isWhitelisted(c) || isRetained(c); in isWhitelistedOrRetained() 69 char c = uri.charAt(i++); in validate() local 70 if (isWhitelistedOrRetained(c)) { in validate() 74 if (c != '%') { in validate() 75 throw unexpectedCharacterException(uri, name, c, i - 1); in validate() 79 c = getNextCharacter(uri, i++, end, name); in validate() [all …]
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | InternalNames.java | 62 public static String getInternalName(Class<?> c) { in getInternalName() argument 63 if (c.isArray()) { in getInternalName() 64 return '[' + getInternalName(c.getComponentType()); in getInternalName() 65 } else if (c == boolean.class) { in getInternalName() 67 } else if (c == byte.class) { in getInternalName() 69 } else if (c == short.class) { in getInternalName() 71 } else if (c == int.class) { in getInternalName() 73 } else if (c == long.class) { in getInternalName() 75 } else if (c == float.class) { in getInternalName() 77 } else if (c == double.class) { in getInternalName() [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | HexDumpEncoder.java | 54 char c; in hexDigit() local 56 c = (char) ((x >> 4) & 0xf); in hexDigit() 57 if (c > 9) in hexDigit() 58 c = (char) ((c-10) + 'A'); in hexDigit() 60 c = (char)(c + '0'); in hexDigit() 61 p.write(c); in hexDigit() 62 c = (char) (x & 0xf); in hexDigit() 63 if (c > 9) in hexDigit() 64 c = (char)((c-10) + 'A'); in hexDigit() 66 c = (char)(c + '0'); in hexDigit() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DateTest.java | 48 Calendar c = Calendar.getInstance(); in test_toGMTString_us() local 49 c.clear(); in test_toGMTString_us() 50 c.set(Calendar.YEAR, 21); in test_toGMTString_us() 51 assertEquals("Wed Jan 01 00:00:00 PST 21", c.getTime().toString()); in test_toGMTString_us() 52 assertEquals("1 Jan 21 08:00:00 GMT", c.getTime().toGMTString()); in test_toGMTString_us() 53 c.set(Calendar.YEAR, 321); in test_toGMTString_us() 54 assertEquals("Sun Jan 01 00:00:00 PST 321", c.getTime().toString()); in test_toGMTString_us() 55 assertEquals("1 Jan 321 08:00:00 GMT", c.getTime().toGMTString()); in test_toGMTString_us() 62 Calendar c = Calendar.getInstance(); in test_toGMTString_nonUs() local 63 c.clear(); in test_toGMTString_nonUs() [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | SchemePrefixBenchmark.java | 36 char c = spec.charAt(i); in JAVA() local 37 if (!isValidSchemeChar(i, c)) { in JAVA() 45 private boolean isValidSchemeChar(int index, char c) { in JAVA() argument 46 if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { in JAVA() 49 if (index > 0 && ((c >= '0' && c <= '9') || c == '+' || c == '-' || c == '.')) { in JAVA()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/callback/ |
D | UnsupportedCallbackExceptionTest.java | 43 Callback c = null; in testUnsupportedCallbackException01() local 44 UnsupportedCallbackException ucE = new UnsupportedCallbackException(c); in testUnsupportedCallbackException01() 55 myCallback c = new myCallback(); in testUnsupportedCallbackException02() local 56 assertNotNull("Callback object is null", c); in testUnsupportedCallbackException02() 57 UnsupportedCallbackException ucE = new UnsupportedCallbackException(c); in testUnsupportedCallbackException02() 59 assertEquals("Incorrect callback object was returned", c, ucE.getCallback()); in testUnsupportedCallbackException02() 90 myCallback c = new myCallback(); in testUnsupportedCallbackException05() local 91 assertNotNull("Callback object is null", c); in testUnsupportedCallbackException05() 92 UnsupportedCallbackException ucE = new UnsupportedCallbackException(c, null); in testUnsupportedCallbackException05() 94 assertEquals("Incorrect callback object was returned", c, ucE.getCallback()); in testUnsupportedCallbackException05() [all …]
|
/libcore/ojluni/src/main/java/java/net/ |
D | URLDecoder.java | 145 char c; in decode() local 148 c = s.charAt(i); in decode() 149 switch (c) { in decode() 174 (c=='%')) { in decode() 188 c = s.charAt(i); in decode() 194 if ((i < numChars) && (c=='%')) in decode() 207 sb.append(c); in decode() 217 private static boolean isValidHexChar(char c) { in isValidHexChar() argument 218 return ('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F'); in isValidHexChar()
|
D | URLConnection.java | 1348 char c = nm[i]; in typeToPackageName() local 1349 if (c == '/') { in typeToPackageName() 1351 } else if (!('A' <= c && c <= 'Z' || in typeToPackageName() 1352 'a' <= c && c <= 'z' || in typeToPackageName() 1353 '0' <= c && c <= '9')) { in typeToPackageName() 1622 int c[] = new int[16]; in checkfpx() local 1623 if (readBytes(c, 2, is) < 0) { in checkfpx() 1628 int byteOrder = c[0]; in checkfpx() 1632 if (readBytes(c, 2, is) < 0) { in checkfpx() 1638 uSectorShift = c[0]; in checkfpx() [all …]
|
/libcore/ojluni/src/main/java/sun/net/ |
D | TelnetOutputStream.java | 96 public void write(int c) throws IOException { in write() argument 98 super.write(c); in write() 103 if (c != '\n') in write() 105 super.write(c); in write() 106 if (c != '\r') in write() 109 if (c == '\n') { in write() 114 if (c == '\r') { in write() 119 c = 0; in write() 122 super.write(c); in write()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | AbstractQueuedLongSynchronizerTest.java | 190 void assertHasWaitersUnlocked(Mutex sync, ConditionObject c, in assertHasWaitersUnlocked() argument 193 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked() 200 void assertHasWaitersLocked(Mutex sync, ConditionObject c, in assertHasWaitersLocked() argument 202 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked() 203 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked() 204 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked() 205 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked() 206 assertEquals(new HashSet<Thread>(sync.getWaitingThreads(c)), in assertHasWaitersLocked() 215 void await(ConditionObject c, AwaitMethod awaitMethod) in await() argument 220 c.await(); in await() [all …]
|
D | AbstractQueuedSynchronizerTest.java | 193 void assertHasWaitersUnlocked(Mutex sync, ConditionObject c, in assertHasWaitersUnlocked() argument 196 assertHasWaitersLocked(sync, c, threads); in assertHasWaitersUnlocked() 203 void assertHasWaitersLocked(Mutex sync, ConditionObject c, in assertHasWaitersLocked() argument 205 assertEquals(threads.length > 0, sync.hasWaiters(c)); in assertHasWaitersLocked() 206 assertEquals(threads.length, sync.getWaitQueueLength(c)); in assertHasWaitersLocked() 207 assertEquals(threads.length == 0, sync.getWaitingThreads(c).isEmpty()); in assertHasWaitersLocked() 208 assertEquals(threads.length, sync.getWaitingThreads(c).size()); in assertHasWaitersLocked() 209 assertEquals(new HashSet<Thread>(sync.getWaitingThreads(c)), in assertHasWaitersLocked() 218 void await(ConditionObject c, AwaitMethod awaitMethod) in await() argument 223 c.await(); in await() [all …]
|
D | ReentrantLockTest.java | 71 public Collection<Thread> getWaitingThreads(Condition c) { in getWaitingThreads() argument 72 return super.getWaitingThreads(c); in getWaitingThreads() 132 void assertHasNoWaiters(PublicReentrantLock lock, Condition c) { in assertHasNoWaiters() argument 133 assertHasWaiters(lock, c, new Thread[] {}); in assertHasNoWaiters() 139 void assertHasWaiters(PublicReentrantLock lock, Condition c, in assertHasWaiters() argument 142 assertEquals(threads.length > 0, lock.hasWaiters(c)); in assertHasWaiters() 143 assertEquals(threads.length, lock.getWaitQueueLength(c)); in assertHasWaiters() 144 assertEquals(threads.length == 0, lock.getWaitingThreads(c).isEmpty()); in assertHasWaiters() 145 assertEquals(threads.length, lock.getWaitingThreads(c).size()); in assertHasWaiters() 146 assertEquals(new HashSet<Thread>(lock.getWaitingThreads(c)), in assertHasWaiters() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | DataOutputStreamTest.java | 52 int c = dis.readInt(); in test_flush() local 54 assertEquals("Failed to flush correctly", 9087589, c); in test_flush() 91 int c = dis.read(); in test_writeI() local 93 assertTrue("Incorrect int written", (int) 't' == c); in test_writeI() 103 boolean c = dis.readBoolean(); in test_writeBooleanZ() 105 assertTrue("Incorrect boolean written", c); in test_writeBooleanZ() 115 byte c = dis.readByte(); in test_writeByteI() 117 assertTrue("Incorrect byte written", c == (byte) 127); in test_writeByteI() 144 char c = dis.readChar(); in test_writeCharI() local 146 assertEquals("Incorrect char written", 'T', c); in test_writeCharI() [all …]
|