Home
last modified time | relevance | path

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

123456789

/libcore/benchmarks/src/benchmarks/regression/
DCharacterBenchmark.java62 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace()
63 fake ^= ((char) ch == ' '); in timeIsSpace()
68 for (int ch = 0; ch < 65536; ++ch) { in timeIsSpace()
69 fake ^= (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/ojluni/src/test/java/util/regex/
DPOSIX_Unicode.java31 public static boolean isAlpha(int ch) { in isAlpha() argument
32 return Character.isAlphabetic(ch); in isAlpha()
35 public static boolean isLower(int ch) { in isLower() argument
36 return Character.isLowerCase(ch); in isLower()
39 public static boolean isUpper(int ch) { in isUpper() argument
40 return Character.isUpperCase(ch); in isUpper()
44 public static boolean isSpace(int ch) { in isSpace() argument
47 (1 << Character.PARAGRAPH_SEPARATOR)) >> Character.getType(ch)) & 1) in isSpace()
49 (ch >= 0x9 && ch <= 0xd) || in isSpace()
50 (ch == 0x85); in isSpace()
[all …]
DPOSIX_ASCII.java190 static int getType(int ch) { in getType() argument
191 return ((ch & 0xFFFFFF80) == 0 ? ctype[ch] : 0); in getType()
194 static boolean isType(int ch, int type) { in isType() argument
195 return (getType(ch) & type) != 0; in isType()
198 static boolean isAscii(int ch) { in isAscii() argument
199 return ((ch & 0xFFFFFF80) == 0); in isAscii()
202 static boolean isAlpha(int ch) { in isAlpha() argument
203 return isType(ch, ALPHA); in isAlpha()
206 static boolean isDigit(int ch) { in isDigit() argument
207 return ((ch-'0')|('9'-ch)) >= 0; in isDigit()
[all …]
/libcore/ojluni/src/main/java/java/util/regex/
DASCII.java198 static int getType(int ch) { in getType() argument
199 return ((ch & 0xFFFFFF80) == 0 ? ctype[ch] : 0); in getType()
202 static boolean isType(int ch, int type) { in isType() argument
203 return (getType(ch) & type) != 0; in isType()
206 static boolean isAscii(int ch) { in isAscii() argument
207 return ((ch & 0xFFFFFF80) == 0); in isAscii()
210 static boolean isAlpha(int ch) { in isAlpha() argument
211 return isType(ch, ALPHA); in isAlpha()
214 static boolean isDigit(int ch) { in isDigit() argument
215 return ((ch-'0')|('9'-ch)) >= 0; in isDigit()
[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/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/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/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/ojluni/src/main/java/java/nio/channels/
DChannels.java44 import sun.nio.ch.ChannelInputStream;
71 private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) in writeFullyImpl() argument
75 int n = ch.write(bb); in writeFullyImpl()
87 private static void writeFully(WritableByteChannel ch, ByteBuffer bb) in writeFully() argument
90 if (ch instanceof SelectableChannel) { in writeFully()
91 SelectableChannel sc = (SelectableChannel) ch; in writeFully()
95 writeFullyImpl(ch, bb); in writeFully()
98 writeFullyImpl(ch, bb); in writeFully()
120 public static InputStream newInputStream(ReadableByteChannel ch) { in newInputStream() argument
121 Objects.requireNonNull(ch, "ch"); in newInputStream()
[all …]
/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()
108 return ChannelInputStream.read(ch, bb, true); in read()
[all …]
DMembershipKeyImpl.java26 package sun.nio.ch;
42 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 …]
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()
/libcore/ojluni/src/main/java/java/lang/constant/
DConstantUtils.java54 char ch = name.charAt(i); in validateBinaryClassName() local
55 if (ch == ';' || ch == '[' || ch == '/') in validateBinaryClassName()
73 char ch = name.charAt(i); in validateMemberName() local
74 if (ch == '.' || ch == ';' || ch == '[' || ch == '/') in validateMemberName()
76 if (method && (ch == '<' || ch == '>')) { in validateMemberName()
220 char ch = name.charAt(index); in verifyUnqualifiedClassName() local
221 if (ch < 128) { in verifyUnqualifiedClassName()
222 if (ch == '.' || ch == ';' || ch == '[' ) { in verifyUnqualifiedClassName()
225 if (ch == '/') { in verifyUnqualifiedClassName()
/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()
179 private WritableByteChannel ch; field in StreamEncoder
196 this.ch = null; in StreamEncoder()
202 ch = ((FileOutputStream)out).getChannel(); in StreamEncoder()
203 if (ch != null) in StreamEncoder()
206 if (ch == null) { in StreamEncoder()
211 private StreamEncoder(WritableByteChannel ch, CharsetEncoder enc, int mbc) { in StreamEncoder() argument
213 this.ch = ch; in StreamEncoder()
229 if (ch != null) { in writeBytes()
[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/test/java/text/Collator/
DCollatorTest.java73 char ch = str.charAt(i); in prettify() local
74 if (ch < 0x09 || (ch > 0x0A && ch < 0x20)|| (ch > 0x7E && ch < 0xA0) || ch > 0x100) { in prettify()
75 String hex = Integer.toString((int)ch,16); in prettify()
79 result.append(ch); in prettify()
/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/ojluni/src/main/java/java/net/
DURLEncoder.java280 char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16); in encode() local
283 if (Character.isLetter(ch)) { in encode()
284 ch -= caseDiff; in encode()
286 out.append(ch); in encode()
287 ch = Character.forDigit(ba[j] & 0xF, 16); in encode()
288 if (Character.isLetter(ch)) { in encode()
289 ch -= caseDiff; in encode()
291 out.append(ch); in encode()
/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/src/main/java/java/lang/
DString.java1919 public int indexOf(int ch) { in indexOf() argument
1920 return indexOf(ch, 0); in indexOf()
1962 public int indexOf(int ch, int fromIndex) { in indexOf() argument
1976 if (ch < Character.MIN_SUPPLEMENTARY_CODE_POINT) { in indexOf()
1980 if (charAt(i) == ch) { in indexOf()
1986 return indexOfSupplementary(ch, fromIndex); in indexOf()
1993 private int indexOfSupplementary(int ch, int fromIndex) { in indexOfSupplementary() argument
1994 if (Character.isValidCodePoint(ch)) { in indexOfSupplementary()
1995 final char hi = Character.highSurrogate(ch); in indexOfSupplementary()
1996 final char lo = Character.lowSurrogate(ch); in indexOfSupplementary()
[all …]
/libcore/ojluni/src/main/java/java/io/
DDataInputStream.java250 int ch = in.read(); in readBoolean() local
251 if (ch < 0) in readBoolean()
253 return (ch != 0); in readBoolean()
273 int ch = in.read(); in readByte() local
274 if (ch < 0) in readByte()
276 return (byte)(ch); in readByte()
296 int ch = in.read(); in readUnsignedByte() local
297 if (ch < 0) in readUnsignedByte()
299 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/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/security/
DDigestInputStream.java125 int ch = in.read(); in read() local
126 if (on && ch != -1) { in read()
127 digest.update((byte)ch); in read()
129 return ch; in read()

123456789