/libcore/benchmarks/src/benchmarks/regression/ |
D | CharacterBenchmark.java | 32 private char[] chars; field in CharacterBenchmark 36 this.chars = characterSet.chars; in setUp() 48 final char[] chars; field in CharacterBenchmark.CharacterSet 50 this.chars = new char[65536]; in CharacterSet() 52 chars[i] = (char) (i % size); in CharacterSet() 80 Character.digit(chars[ch], 10); in timeDigit() 86 Character.digit((int) chars[ch], 10); in timeDigit() 96 Character.getNumericValue(chars[ch]); in timeGetNumericValue() 102 Character.getNumericValue((int) chars[ch]); in timeGetNumericValue() 112 Character.isDigit(chars[ch]); in timeIsDigit() [all …]
|
D | StringToBytesBenchmark.java | 43 char[] chars = new char[length]; in makeString() local 45 chars[i] = (char) i; in makeString() 47 return new String(chars); in makeString() 51 char[] chars = new char[length]; in makeAsciiString() local 53 chars[i] = ((i & 0x7f) != 0) ? (char) (i & 0x7f) : '?'; in makeAsciiString() 55 return new String(chars); in makeAsciiString()
|
/libcore/luni/src/test/java/libcore/java/awt/font/ |
D | NumericShaperTest.java | 38 char[] chars = input.toCharArray(); in testShape() local 39 ns.shape(chars, 0, chars.length); in testShape() 40 assertEquals(expected, new String(chars)); in testShape() 42 chars = input.toCharArray(); in testShape() 43 ns.shape(chars, 0, chars.length, NumericShaper.EUROPEAN); in testShape() 44 assertEquals(expected, new String(chars)); in testShape() 46 chars = input.toCharArray(); in testShape() 47 ns.shape(chars, 0, chars.length, Range.EUROPEAN); in testShape() 48 assertEquals(expected, new String(chars)); in testShape()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | Helpers.java | 82 final char[] chars = new char[charLength + 2 * size]; in toString() local 83 chars[0] = '['; in toString() 87 chars[j++] = ','; in toString() 88 chars[j++] = ' '; in toString() 92 s.getChars(0, len, chars, j); in toString() 95 chars[j] = ']'; in toString() 97 return new String(chars); in toString() 104 final char[] chars = in mapEntryToString() local 107 k.getChars(0, klen, chars, 0); in mapEntryToString() 108 chars[klen] = '='; in mapEntryToString() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldInputStreamReaderTest.java | 118 char[] chars = new char[source.length()]; in testReadcharArrayintint() local 119 assertEquals(0, reader.read(chars, 0, 0)); in testReadcharArrayintint() 120 assertEquals(0, chars[0]); in testReadcharArrayintint() 121 assertEquals(3, reader.read(chars, 0, 3)); in testReadcharArrayintint() 122 assertEquals(5, reader.read(chars, 3, 5)); in testReadcharArrayintint() 123 assertEquals(source.length() - 8, reader.read(chars, 8, in testReadcharArrayintint() 124 chars.length - 8)); in testReadcharArrayintint() 125 assertTrue(Arrays.equals(chars, source.toCharArray())); in testReadcharArrayintint() 126 assertEquals(-1, reader.read(chars, 0, chars.length)); in testReadcharArrayintint() 127 assertTrue(Arrays.equals(chars, source.toCharArray())); in testReadcharArrayintint() [all …]
|
D | OldOutputStreamWriterTest.java | 294 char[] chars = new char[maxChar]; in testEncodeCharset() local 296 chars[i] = (char) i; in testEncodeCharset() 302 charsOut.write(chars); in testEncodeCharset() 339 char[] chars = testString.toCharArray(); in test_write$CII() local 347 writer.write(chars, -1, 1); in test_write$CII() 354 writer.write(chars, 0, -1); in test_write$CII() 375 writer.write(chars, 1, chars.length); in test_write$CII() 381 writer.write(chars, 0, chars.length + 1); in test_write$CII() 387 writer.write(chars, chars.length, 1); in test_write$CII() 393 writer.write(chars, chars.length + 1, 0); in test_write$CII() [all …]
|
D | DataOutputStreamTest.java | 94 char[] chars = new char[65535 - 1 - 2]; in test_writeUTF() local 95 Arrays.fill(chars, 0, chars.length, 'a'); in test_writeUTF() 96 chars[0] = '\u0666'; // a two-byte character in test_writeUTF() 97 chars[1] = '\u2603'; // a three-byte character in test_writeUTF() 98 String maxLength = new String(chars); in test_writeUTF()
|
D | OldBufferedReaderTest.java | 108 char[] chars = new char[256]; in test_markI() local 110 chars[i] = (char) i; in test_markI() 112 chars)), 12); in test_markI() 124 in = new BufferedReader(new Support_StringReader(new String(chars)), 12); in test_markI() 156 char[] chars = new char[256]; in test_read() local 158 chars[i] = (char) i; in test_read() 160 chars)), 12); in test_read() 167 .equals(new String(chars, 1, 14))); in test_read() 356 char[] chars = new char[1]; in test_readLine_interaction_with_array_read_2() local 357 assertEquals(1, r.read(chars, 0, 1)); // This read skips the '\n'. in test_readLine_interaction_with_array_read_2() [all …]
|
D | OutputStreamWriterTest.java | 36 char[] chars = new char[16*1024]; in testFlushCount() local 37 Arrays.fill(chars, 'x'); in testFlushCount() 39 writer.write(chars); in testFlushCount()
|
/libcore/luni/src/test/java/libcore/java/lang/reflect/ |
D | ArrayTest.java | 25 private static char[] chars; field in ArrayTest 36 chars = new char[] { '\uffff' }; in setUp() 47 try { Array.getBoolean(chars, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetBoolean() 59 try { Array.getByte(chars, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetByte() 71 assertEquals(chars[0], Array.getChar(chars, 0)); in testGetChar() 83 assertEquals((double) chars[0], Array.getDouble(chars, 0)); in testGetDouble() 95 assertEquals((float) chars[0], Array.getFloat(chars, 0)); in testGetFloat() 107 assertEquals((int) chars[0], Array.getInt(chars, 0)); in testGetInt() 119 assertEquals((long) chars[0], Array.getLong(chars, 0)); in testGetLong() 131 try { Array.getShort(chars, 0); fail(); } catch (IllegalArgumentException expected) {} in testGetShort() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | PatternEntry.java | 63 appendQuoted(chars,toAddTo); in appendQuotedChars() 74 boolean result = chars.equals(other.chars); in equals() 79 return chars.hashCode(); in hashCode() 109 return chars; in getChars() 143 appendQuoted(chars,toAddTo); in addToBuffer() 150 static void appendQuoted(String chars, StringBuffer toAddTo) { in appendQuoted() argument 152 char ch = chars.charAt(0); in appendQuoted() 179 toAddTo.append(chars); in appendQuoted() 189 StringBuffer chars, in PatternEntry() argument 193 this.chars = chars.toString(); in PatternEntry() [all …]
|
D | MergeCollation.java | 242 if (lastEntry != null && newEntry.chars.equals(lastEntry.chars) in fixEntry() 259 if ((newEntry.chars.length() == 1)) { in fixEntry() 261 char c = newEntry.chars.charAt(0); in fixEntry() 313 if ((entry.chars.length() == 1)) { in findLastEntry() 314 int index = entry.chars.charAt(0) >> BYTEPOWER; in findLastEntry() 316 (BITARRAYMASK << (entry.chars.charAt(0) & BYTEMASK))) != 0) { in findLastEntry() 330 if (e.chars.regionMatches(0,entry.chars,0, in findLastEntry() 331 e.chars.length())) { in findLastEntry() 332 excessChars.append(entry.chars.substring(e.chars.length(), in findLastEntry() 333 entry.chars.length())); in findLastEntry()
|
/libcore/benchmarks/src/benchmarks/ |
D | StringIterationBenchmark.java | 45 char[] chars = s.toCharArray(); in timeStringIteration2() local 46 for (int i = 0, length = chars.length; i < length; ++i) { in timeStringIteration2() 47 ch = chars[i]; in timeStringIteration2() 54 char[] chars = s.toCharArray(); in timeStringToCharArray() local
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | InputStreamReaderTest.java | 457 char[] chars = new char[source.length()]; in test_read$CII() local 458 assertEquals(source.length() - 3, isr.read(chars, 0, chars.length - 3)); in test_read$CII() 459 assertEquals(3, isr.read(chars, 0, 10)); in test_read$CII() 505 char[] chars = new char[source.length()]; in test_read$CII_1() local 506 assertEquals(0, reader.read(chars, 0, 0)); in test_read$CII_1() 507 assertEquals(0, chars[0]); in test_read$CII_1() 508 assertEquals(3, reader.read(chars, 0, 3)); in test_read$CII_1() 509 assertEquals(5, reader.read(chars, 3, 5)); in test_read$CII_1() 510 assertEquals(source.length() - 8, reader.read(chars, 8, in test_read$CII_1() 511 chars.length - 8)); in test_read$CII_1() [all …]
|
D | PushbackReaderTest.java | 221 char chars[] = new char[] { 'h', 'e', 'l', 'l', 'o' }; in test_skip$J() local 226 reader = new StringReader(new String(chars)); in test_skip$J() 227 reader2 = new StringReader(new String(chars)); in test_skip$J() 230 reader = new FilterReader(new StringReader(new String(chars))) { in test_skip$J() 232 reader2 = new FilterReader(new StringReader(new String(chars))) { in test_skip$J() 236 reader = new CharArrayReader(chars); in test_skip$J() 237 reader2 = new CharArrayReader(chars); in test_skip$J()
|
D | BufferedReaderTest.java | 128 char[] chars = new char[256]; in test_markI() local 130 chars[i] = (char) i; in test_markI() 132 chars)), 12); in test_markI() 141 in = new BufferedReader(new Support_StringReader(new String(chars)), 12); in test_markI() 202 char[] chars = new char[256]; in test_read() local 204 chars[i] = (char) i; in test_read() 206 chars)), 12); in test_read() 213 .equals(new String(chars, 1, 14))); in test_read()
|
/libcore/ojluni/src/main/native/ |
D | io_util_md.c | 57 char* chars = malloc(ulen); in newStringPlatform() local 58 if (chars == NULL) { in newStringPlatform() 62 if (CFStringGetCString(csref, chars, ulen, kCFStringEncodingUTF16)) { in newStringPlatform() 63 rv = (*env)->NewString(env, (jchar*)chars, clen); in newStringPlatform() 65 free(chars); in newStringPlatform()
|
D | jni_util_md.c | 39 void nativeReleaseStringPlatformChars(JNIEnv* env, jstring jstr, const char* chars) { in nativeReleaseStringPlatformChars() argument 40 (*env)->ReleaseStringUTFChars(env, jstr, chars); in nativeReleaseStringPlatformChars()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | PropertyResourceBundleTest.java | 77 char[] chars = new char[cbuffer.limit()]; in test_ConstructorLjava_io_Reader() local 78 cbuffer.get(chars); in test_ConstructorLjava_io_Reader() 80 prb = new PropertyResourceBundle(new CharArrayReader(chars)); in test_ConstructorLjava_io_Reader() 87 chars = new char[cbuffer.limit()]; in test_ConstructorLjava_io_Reader() 88 cbuffer.get(chars); in test_ConstructorLjava_io_Reader() 90 prb = new PropertyResourceBundle(new CharArrayReader(chars)); in test_ConstructorLjava_io_Reader()
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixUriUtils.java | 135 private static long lowMask(String chars) { in lowMask() argument 136 int n = chars.length(); in lowMask() 139 char c = chars.charAt(i); in lowMask() 147 private static long highMask(String chars) { in highMask() argument 148 int n = chars.length(); in highMask() 151 char c = chars.charAt(i); in highMask()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetEncoder2Test.java | 187 CharBuffer chars = utf8.newDecoder().decode(bytes); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() local 189 assertEquals(2, chars.limit()); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() 190 assertEquals(0xd800, chars.get(0)); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() 191 assertEquals(0xdc00, chars.get(1)); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB()
|
/libcore/luni/src/main/java/libcore/util/ |
D | CharsetUtils.java | 73 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); in asciiBytesToChars() argument 83 …ublic static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars); in isoLatin1BytesToChars() argument
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | LibcoreIoDerivedBase64Test.java | 229 char[] chars = new char[charsBuffer.remaining()]; in bytesToAscii() local 230 charsBuffer.get(chars, 0, chars.length); in bytesToAscii() 231 return new String(chars); in bytesToAscii() 241 char[] chars = string.toCharArray(); in asciiToBytes() local 246 CharBuffer charsBuffer = CharBuffer.wrap(chars); in asciiToBytes()
|
/libcore/luni/src/main/java/libcore/internal/ |
D | StringPool.java | 33 private static boolean contentEquals(String s, char[] chars, int start, int length) { in contentEquals() argument 38 if (chars[start + i] != s.charAt(i)) { in contentEquals()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringBufferTest.java | 31 assertTrue(Arrays.equals(expected, s.chars().toArray())); in testChars() 36 assertTrue(Arrays.equals(new int[]{high, low, low}, surrogateCP.chars().toArray())); in testChars()
|