Home
last modified time | relevance | path

Searched refs:ch (Results 1 – 25 of 171) sorted by relevance

1234567

/libcore/benchmarks/src/benchmarks/regression/
DCharacterBenchmark.java62 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace()
63 dummy ^= ((char) ch == ' '); in timeIsSpace()
68 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace()
69 dummy ^= (ch == ' '); in timeIsSpace()
79 for (int ch = 0; ch < 65536; ++ch) { in timeDigit()
80 Character.digit(chars[ch], 10); in timeDigit()
85 for (int ch = 0; ch < 65536; ++ch) { in timeDigit()
86 Character.digit((int) chars[ch], 10); in timeDigit()
95 for (int ch = 0; ch < 65536; ++ch) { in timeGetNumericValue()
96 Character.getNumericValue(chars[ch]); in timeGetNumericValue()
[all …]
/libcore/luni/src/main/java/javax/xml/parsers/
DFilePathToURI.java43 char ch;
45 ch = escChs[i];
46 gNeedEscaping[ch] = true;
47 gAfterEscaping1[ch] = gHexChs[ch >> 4];
48 gAfterEscaping2[ch] = gHexChs[ch & 0xf];
63 int len = path.length(), ch; in filepath2URI() local
68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI()
69 if (ch >= 'A' && ch <= 'Z') { in filepath2URI()
77 ch = path.charAt(i); in filepath2URI()
79 if (ch >= 128) in filepath2URI()
[all …]
/libcore/luni/src/main/java/javax/xml/transform/stream/
DFilePathToURI.java43 char ch;
45 ch = escChs[i];
46 gNeedEscaping[ch] = true;
47 gAfterEscaping1[ch] = gHexChs[ch >> 4];
48 gAfterEscaping2[ch] = gHexChs[ch & 0xf];
63 int len = path.length(), ch; in filepath2URI() local
68 ch = Character.toUpperCase(path.charAt(0)); in filepath2URI()
69 if (ch >= 'A' && ch <= 'Z') { in filepath2URI()
77 ch = path.charAt(i); in filepath2URI()
79 if (ch >= 128) in filepath2URI()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DASCIICaseInsensitiveComparator.java84 static boolean isLower(int ch) {
85 return ((ch-'a')|('z'-ch)) >= 0;
88 static boolean isUpper(int ch) {
89 return ((ch-'A')|('Z'-ch)) >= 0;
92 static int toLower(int ch) {
93 return isUpper(ch) ? (ch + 0x20) : ch;
96 static int toUpper(int ch) {
97 return isLower(ch) ? (ch - 0x20) : ch;
/libcore/libart/src/main/java/java/lang/
DCaseMapper.java55 char ch = s.charAt(i); in toLowerCase() local
57 if (ch == LATIN_CAPITAL_I_WITH_DOT || Character.isHighSurrogate(ch)) { in toLowerCase()
60 } else if (ch == GREEK_CAPITAL_SIGMA && isFinalSigma(s, i)) { in toLowerCase()
63 newCh = Character.toLowerCase(ch); in toLowerCase()
65 if (ch != newCh) { in toLowerCase()
108 private static int upperIndex(int ch) { in upperIndex() argument
110 if (ch >= 0xdf) { in upperIndex()
111 if (ch <= 0x587) { in upperIndex()
112 switch (ch) { in upperIndex()
120 } else if (ch >= 0x1e96) { in upperIndex()
[all …]
/libcore/ojluni/src/main/java/java/text/
DPatternEntry.java152 char ch = chars.charAt(0); in appendQuoted() local
153 if (Character.isSpaceChar(ch)) { in appendQuoted()
157 if (PatternEntry.isSpecialChar(ch)) { in appendQuoted()
161 switch (ch) { in appendQuoted()
217 char ch = pattern.charAt(i); in next() local
219 if (ch == '\'') { in next()
222 if (newChars.length() == 0) newChars.append(ch); in next()
223 else if (inChars) newChars.append(ch); in next()
224 else newExtension.append(ch); in next()
226 } else switch (ch) { in next()
[all …]
DChoiceFormat.java189 char ch = newPattern.charAt(i); in applyPattern() local
190 if (ch=='\'') { in applyPattern()
192 if ((i+1)<newPattern.length() && newPattern.charAt(i+1)==ch) { in applyPattern()
193 segments[part].append(ch); in applyPattern()
199 segments[part].append(ch); in applyPattern()
200 } else if (ch == '<' || ch == '#' || ch == '\u2264') { in applyPattern()
217 if (ch == '<' && startValue != Double.POSITIVE_INFINITY && in applyPattern()
226 } else if (ch == '|') { in applyPattern()
238 segments[part].append(ch); in applyPattern()
/libcore/ojluni/src/main/java/sun/nio/ch/
DChannelInputStream.java27 package sun.nio.ch;
48 public static int read(ReadableByteChannel ch, ByteBuffer bb, in read() argument
52 if (ch instanceof SelectableChannel) { in read()
53 SelectableChannel sc = (SelectableChannel)ch; in read()
60 int n = ch.read(bb); in read()
66 return ch.read(bb); in read()
70 protected final ReadableByteChannel ch; field in ChannelInputStream
75 public ChannelInputStream(ReadableByteChannel ch) { in ChannelInputStream() argument
76 this.ch = ch; in ChannelInputStream()
110 return ChannelInputStream.read(ch, bb, true); in read()
[all …]
DFileLockImpl.java26 package sun.nio.ch;
56 Channel ch = acquiredBy(); in release() local
57 if (!ch.isOpen()) in release()
60 if (ch instanceof FileChannelImpl) in release()
61 ((FileChannelImpl)ch).release(this); in release()
62 else if (ch instanceof AsynchronousFileChannelImpl) in release()
63 ((AsynchronousFileChannelImpl)ch).release(this); in release()
DMembershipKeyImpl.java26 package sun.nio.ch;
41 private final MulticastChannel ch; field in MembershipKeyImpl
55 private MembershipKeyImpl(MulticastChannel ch, in MembershipKeyImpl() argument
60 this.ch = ch; in MembershipKeyImpl()
74 Type4(MulticastChannel ch, in Type4() argument
82 super(ch, group, interf, source); in Type4()
109 Type6(MulticastChannel ch, in Type6() argument
117 super(ch, group, interf, source); in Type6()
147 ((DatagramChannelImpl)ch).drop(this); in drop()
152 return ch; in channel()
[all …]
/libcore/ojluni/src/main/java/java/nio/channels/
DChannels.java43 import sun.nio.ch.ChannelInputStream;
75 private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) in writeFullyImpl() argument
79 int n = ch.write(bb); in writeFullyImpl()
91 private static void writeFully(WritableByteChannel ch, ByteBuffer bb) in writeFully() argument
94 if (ch instanceof SelectableChannel) { in writeFully()
95 SelectableChannel sc = (SelectableChannel)ch; in writeFully()
99 writeFullyImpl(ch, bb); in writeFully()
102 writeFullyImpl(ch, bb); in writeFully()
124 public static InputStream newInputStream(ReadableByteChannel ch) { in newInputStream() argument
125 checkNotNull(ch, "ch"); in newInputStream()
[all …]
/libcore/benchmarks/src/benchmarks/
DStringIterationBenchmark.java26 char ch; in timeStringIteration0() local
28 ch = s.charAt(i); in timeStringIteration0()
35 char ch; in timeStringIteration1() local
37 ch = s.charAt(i); in timeStringIteration1()
44 char ch; in timeStringIteration2() local
47 ch = chars[i]; in timeStringIteration2()
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamDecoder.java94 public static StreamDecoder forDecoder(ReadableByteChannel ch, in forDecoder() argument
98 return new StreamDecoder(ch, dec, minBufferCap); in forDecoder()
231 private ReadableByteChannel ch; field in StreamDecoder
247 ch = getChannel((FileInputStream)in); in StreamDecoder()
248 if (ch != null) in StreamDecoder()
251 if (ch == null) { in StreamDecoder()
253 this.ch = null; in StreamDecoder()
259 StreamDecoder(ReadableByteChannel ch, CharsetDecoder dec, int mbc) { in StreamDecoder() argument
261 this.ch = ch; in StreamDecoder()
275 if (ch != null) { in readBytes()
[all …]
DStreamEncoder.java81 public static StreamEncoder forEncoder(WritableByteChannel ch, in forEncoder() argument
85 return new StreamEncoder(ch, enc, minBufferCap); in forEncoder()
167 private WritableByteChannel ch; field in StreamEncoder
184 this.ch = null; in StreamEncoder()
190 ch = ((FileOutputStream)out).getChannel(); in StreamEncoder()
191 if (ch != null) in StreamEncoder()
194 if (ch == null) { in StreamEncoder()
199 private StreamEncoder(WritableByteChannel ch, CharsetEncoder enc, int mbc) { in StreamEncoder() argument
201 this.ch = ch; in StreamEncoder()
217 if (ch != null) { in writeBytes()
[all …]
/libcore/luni/src/main/java/libcore/reflect/
DTypes.java142 char ch = as[len].charAt(0); in appendGenericType() local
143 if (ch == 'I') { in appendGenericType()
145 } else if (ch == 'B') { in appendGenericType()
147 } else if (ch == 'J') { in appendGenericType()
149 } else if (ch == 'F') { in appendGenericType()
151 } else if (ch == 'D') { in appendGenericType()
153 } else if (ch == 'S') { in appendGenericType()
155 } else if (ch == 'C') { in appendGenericType()
157 } else if (ch == 'Z') { in appendGenericType()
159 } else if (ch == 'V') { in appendGenericType()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/callback/
DCallbackHandlerTest.java35 CallbackHandlerImpl ch = new CallbackHandlerImpl(); in test_CallbackHandler() local
36 assertFalse(ch.called); in test_CallbackHandler()
37 ch.handle(null); in test_CallbackHandler()
38 assertTrue(ch.called); in test_CallbackHandler()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DASCIICaseInsensitiveComparator.java44 static boolean isLower(int ch) { in isLower() argument
48 static boolean isUpper(int ch) { in isUpper() argument
52 static int toLower(int ch) { in toLower() argument
56 static int toUpper(int ch) { in toUpper() argument
/libcore/ojluni/src/main/java/java/net/
DURLEncoder.java272 char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16); in encode() local
275 if (Character.isLetter(ch)) { in encode()
276 ch -= caseDiff; in encode()
278 out.append(ch); in encode()
279 ch = Character.forDigit(ba[j] & 0xF, 16); in encode()
280 if (Character.isLetter(ch)) { in encode()
281 ch -= caseDiff; in encode()
283 out.append(ch); in encode()
/libcore/ojluni/src/main/java/java/security/
DDigestInputStream.java124 int ch = in.read(); in read() local
125 if (on && ch != -1) { in read()
126 digest.update((byte)ch); in read()
128 return ch; in read()
/libcore/ojluni/src/main/java/java/io/
DDataInputStream.java245 int ch = in.read(); in readBoolean() local
246 if (ch < 0) in readBoolean()
248 return (ch != 0); in readBoolean()
268 int ch = in.read(); in readByte() local
269 if (ch < 0) in readByte()
271 return (byte)(ch); in readByte()
291 int ch = in.read(); in readUnsignedByte() local
292 if (ch < 0) in readUnsignedByte()
294 return ch; in readUnsignedByte()
DStreamTokenizer.java341 public void ordinaryChar(int ch) { in ordinaryChar() argument
342 if (ch >= 0 && ch < ctype.length) in ordinaryChar()
343 ctype[ch] = 0; in ordinaryChar()
355 public void commentChar(int ch) { in commentChar() argument
356 if (ch >= 0 && ch < ctype.length) in commentChar()
357 ctype[ch] = CT_COMMENT; in commentChar()
384 public void quoteChar(int ch) { in quoteChar() argument
385 if (ch >= 0 && ch < ctype.length) in quoteChar()
386 ctype[ch] = CT_QUOTE; in quoteChar()
/libcore/luni/src/main/java/libcore/icu/
DICU.java325 char ch = pattern.charAt(i); in getDateFormatOrder() local
326 if (ch == 'd' || ch == 'L' || ch == 'M' || ch == 'y') { in getDateFormatOrder()
327 if (ch == 'd' && !sawDay) { in getDateFormatOrder()
330 } else if ((ch == 'L' || ch == 'M') && !sawMonth) { in getDateFormatOrder()
333 } else if ((ch == 'y') && !sawYear) { in getDateFormatOrder()
337 } else if (ch == 'G') { in getDateFormatOrder()
339 } else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) { in getDateFormatOrder()
340 throw new IllegalArgumentException("Bad pattern character '" + ch + "' in " + pattern); in getDateFormatOrder()
341 } else if (ch == '\'') { in getDateFormatOrder()
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/
DSelectorImpl.java26 package sun.nio.ch;
72 public void putEventOps(sun.nio.ch.SelectionKeyImpl sk, int ops) { in putEventOps()
77 java.nio.channels.spi.AbstractSelectableChannel ch, in register() argument
83 protected abstract void implRegister(sun.nio.ch.SelectionKeyImpl ski); in implRegister()
89 protected abstract void implDereg(sun.nio.ch.SelectionKeyImpl ski) throws java.io.IOException; in implDereg()
/libcore/luni/src/main/java/libcore/util/
DCharsetUtils.java57 char ch = s.charAt(i); in toBigEndianUtf16Bytes() local
58 result[resultIndex++] = (byte) (ch >> 8); in toBigEndianUtf16Bytes()
59 result[resultIndex++] = (byte) ch; in toBigEndianUtf16Bytes()
/libcore/xml/src/main/java/com/android/org/kxml2/io/
DKXmlSerializer.java181 private static void reportInvalidCharacter(char ch) { in reportInvalidCharacter() argument
182 … throw new IllegalArgumentException("Illegal character (U+" + Integer.toHexString((int) ch) + ")"); in reportInvalidCharacter()
583 char ch = data.charAt(i); in cdsect() local
584 boolean allowedInCdata = (ch >= 0x20 && ch <= 0xd7ff) || in cdsect()
585 (ch == '\t' || ch == '\n' || ch == '\r') || in cdsect()
586 (ch >= 0xe000 && ch <= 0xfffd); in cdsect()
588 append(ch); in cdsect()
589 } else if (Character.isHighSurrogate(ch) && i < data.length() - 1) { in cdsect()
592 writeSurrogate(ch, data.charAt(++i)); in cdsect()
595 reportInvalidCharacter(ch); in cdsect()

1234567