/libcore/ojluni/src/main/java/sun/misc/ |
D | Version.java | 268 CharSequence cs = System.getProperty("java.vm.version"); in initVersions() local 269 if (cs.length() >= 5 && in initVersions() 270 Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' && in initVersions() 271 Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' && in initVersions() 272 Character.isDigit(cs.charAt(4))) { in initVersions() 273 jvm_major_version = Character.digit(cs.charAt(0), 10); in initVersions() 274 jvm_minor_version = Character.digit(cs.charAt(2), 10); in initVersions() 275 jvm_micro_version = Character.digit(cs.charAt(4), 10); in initVersions() 276 cs = cs.subSequence(5, cs.length()); in initVersions() 277 if (cs.charAt(0) == '_' && cs.length() >= 3 && in initVersions() [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringCoding.java | 43 import sun.nio.cs.HistoricallyNamedCharset; 44 import sun.nio.cs.ArrayDecoder; 45 import sun.nio.cs.ArrayEncoder; 76 private static byte[] safeTrim(byte[] ba, int len, Charset cs, boolean isTrusted) { in safeTrim() argument 92 Charset cs, boolean isTrusted) { in safeTrim() argument 136 private final Charset cs; field in StringCoding.StringDecoder 140 private StringDecoder(Charset cs, String rcn) { in StringDecoder() argument 142 this.cs = cs; in StringDecoder() 143 this.cd = cs.newDecoder() in StringDecoder() 146 this.isTrusted = (cs.getClass().getClassLoader() == null); in StringDecoder() [all …]
|
/libcore/ojluni/src/main/java/java/security/ |
D | SecureClassLoader.java | 140 CodeSource cs) in defineClass() argument 142 return defineClass(name, b, off, len, getProtectionDomain(cs)); in defineClass() 172 CodeSource cs) in defineClass() argument 174 return defineClass(name, b, getProtectionDomain(cs)); in defineClass() 198 private ProtectionDomain getProtectionDomain(CodeSource cs) { in getProtectionDomain() argument 199 if (cs == null) in getProtectionDomain() 204 pd = pdcache.get(cs); in getProtectionDomain() 206 PermissionCollection perms = getPermissions(cs); in getProtectionDomain() 207 pd = new ProtectionDomain(cs, perms, this, null); in getProtectionDomain() 208 pdcache.put(cs, pd); in getProtectionDomain()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 53 Charset cs = Charset.forName(charsetName); in test_allAvailableCharsets() local 54 assertNotNull(cs.newDecoder()); in test_allAvailableCharsets() 55 if (cs.canEncode()) { in test_allAvailableCharsets() 56 CharsetEncoder enc = cs.newEncoder(); in test_allAvailableCharsets() 88 Charset cs = Charset.forName(name); in test_isRegistered() local 89 if (!cs.isRegistered()) { in test_isRegistered() 90 … System.err.println("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases()); in test_isRegistered() 92 …assertTrue("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() 96 Charset cs = Charset.forName(name); in test_isRegistered() local 97 …assertFalse("isRegistered was true for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() [all …]
|
D | CharsetEncoder2Test.java | 40 Charset cs = Charset.forName("UTF-8"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 41 new MockCharsetEncoderForHarmony141(cs, 1.1f, 1); in test_ConstructorLjava_nio_charset_CharsetFF() 48 Charset cs = Charset.forName("ISO8859-1"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 49 new MockCharsetEncoderForHarmony141(cs, 1.1f, 1, in test_ConstructorLjava_nio_charset_CharsetFF() 73 protected MockCharsetEncoderForHarmony141(Charset cs, in MockCharsetEncoderForHarmony141() argument 75 super(cs, averageBytesPerChar, maxBytesPerChar); in MockCharsetEncoderForHarmony141() 78 public MockCharsetEncoderForHarmony141(Charset cs, in MockCharsetEncoderForHarmony141() argument 81 super(cs, averageBytesPerChar, maxBytesPerChar, replacement); in MockCharsetEncoderForHarmony141() 109 MockMalfunctionCharset cs = new MockMalfunctionCharset("mock", null); in test_EncodeLjava_nio_CharBuffer() local 111 cs.encode(CharBuffer.wrap("AB")); in test_EncodeLjava_nio_CharBuffer() [all …]
|
D | CharsetDecoder2Test.java | 44 Charset cs = Charset.forName("UTF-8"); //$NON-NLS-1$ in test_ConstructorLjava_nio_charset_CharsetFF() local 45 new MockCharsetDecoderForHarmony142(cs, 1.1f, 1); in test_ConstructorLjava_nio_charset_CharsetFF() 56 protected MockCharsetDecoderForHarmony142(Charset cs, in MockCharsetDecoderForHarmony142() argument 58 super(cs, averageBytesPerChar, maxBytesPerChar); in MockCharsetDecoderForHarmony142() 137 public boolean contains(Charset cs) { in contains() argument 155 public MockMalfunctionDecoder(Charset cs) { in MockMalfunctionDecoder() argument 156 super(cs, 1, 10); in MockMalfunctionDecoder() 169 public MockMalfunctionEncoder(Charset cs) { in MockMalfunctionEncoder() argument 170 super(cs, 1, 3, new byte[] { (byte) '?' }); in MockMalfunctionEncoder() 184 Charset cs = Charset.forName("UTF-8"); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() local [all …]
|
D | CharsetEncoderTest.java | 45 Charset cs = MOCKCS; field in CharsetEncoderTest 66 encoder = cs.newEncoder(); in setUp() 107 encoder = new MockCharsetEncoder(cs, (float) AVER_BYTES, MAX_BYTES); in testCharsetEncoderCharsetfloatfloat() 108 assertSame(encoder.charset(), cs); in testCharsetEncoderCharsetfloatfloat() local 121 CharsetEncoder ec = new MockCharsetEncoder(cs, 1, MAX_BYTES); in testCharsetEncoderCharsetfloatfloat() 122 assertSame(ec.charset(), cs); in testCharsetEncoderCharsetfloatfloat() local 147 ec = new MockCharsetEncoder(cs, 0, MAX_BYTES); in testCharsetEncoderCharsetfloatfloat() 152 ec = new MockCharsetEncoder(cs, 1, 0); in testCharsetEncoderCharsetfloatfloat() 159 ec = new MockCharsetEncoder(cs, -1, MAX_BYTES); in testCharsetEncoderCharsetfloatfloat() 164 ec = new MockCharsetEncoder(cs, 1, -1); in testCharsetEncoderCharsetfloatfloat() [all …]
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | Charset.java | 51 import sun.nio.cs.ThreadLocalCoders; 340 private static void cache(String charsetName, Charset cs) { in cache() argument 342 String canonicalName = cs.name(); in cache() 346 cs = canonicalCharset; in cache() 348 cache2.put(canonicalName, cs); in cache() 350 for (String alias : cs.aliases()) { in cache() 351 cache2.put(alias, cs); in cache() 355 cache2.put(charsetName, cs); in cache() 358 cache1 = new AbstractMap.SimpleImmutableEntry<>(charsetName, cs); in cache() 437 Charset cs = cp.charsetForName(charsetName); in lookupViaProviders() local [all …]
|
D | CharsetEncoder.java | 183 CharsetEncoder(Charset cs, in CharsetEncoder() argument 189 this(cs, averageBytesPerChar, maxBytesPerChar, replacement, false); in CharsetEncoder() 192 CharsetEncoder(Charset cs, in CharsetEncoder() argument 199 this.charset = cs; in CharsetEncoder() 240 protected CharsetEncoder(Charset cs, in CharsetEncoder() argument 244 this(cs, in CharsetEncoder() 981 public boolean canEncode(CharSequence cs) { in canEncode() argument 983 if (cs instanceof CharBuffer) in canEncode() 984 cb = ((CharBuffer)cs).duplicate(); in canEncode() 986 cb = CharBuffer.wrap(cs); in canEncode()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | Collector.java | 268 Set<Characteristics> cs = (characteristics.length == 0) in of() local 272 return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, cs); in of() 301 Set<Characteristics> cs = Collectors.CH_NOID; in of() local 303 cs = EnumSet.noneOf(Characteristics.class); in of() 304 Collections.addAll(cs, characteristics); in of() 305 cs = Collections.unmodifiableSet(cs); in of() 307 return new Collectors.CollectorImpl<>(supplier, accumulator, combiner, finisher, cs); in of()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetTest.java | 24 Charset cs = Charset.forName("UTF8"); in test_nonstandardCharsetName() local 25 assertNotNull(cs); in test_nonstandardCharsetName() 26 assertEquals("UTF-8", cs.name()); in test_nonstandardCharsetName() 44 Charset cs = Charset.forName(name); in run() local 45 if (!name.equals(cs.name())) { in run()
|
D | CharsetEncoderTest.java | 69 Charset cs = Charset.forName("UTF-32BE"); in testSurrogatePairAllAtOnce() local 70 CharsetEncoder e = cs.newEncoder(); in testSurrogatePairAllAtOnce() 83 Charset cs = Charset.forName("UTF-32BE"); in testMalformedSurrogatePair() local 84 CharsetEncoder e = cs.newEncoder(); in testMalformedSurrogatePair() 118 Charset cs = Charset.forName("UTF-32BE"); in testCharsetEncoderSplitSurrogates() local 119 CharsetEncoder e = cs.newEncoder(); in testCharsetEncoderSplitSurrogates() 144 Charset cs = Charset.forName("UTF-32BE"); in testFlushWithoutEndOfInput() local 145 CharsetEncoder e = cs.newEncoder(); in testFlushWithoutEndOfInput()
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | CharsetICU.java | 30 public boolean contains(Charset cs) { in contains() argument 31 if (cs == null) { in contains() 33 } else if (this.equals(cs)) { in contains() 36 return NativeConverter.contains(this.name(), cs.name()); in contains()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldDatagramPacketTest.java | 46 DatagramSocket cs = new DatagramSocket(); in test_getPort() local 50 cs.send(packet); in test_getPort() 51 cs.setSoTimeout(3000); in test_getPort() 52 cs.receive(packet); in test_getPort() 53 cs.close(); in test_getPort() 56 cs.close(); in test_getPort()
|
/libcore/luni/src/test/java/tests/java/security/ |
D | SecureClassLoaderTest.java | 183 CodeSource cs = new CodeSource(url, (Certificate[]) null); in testGetPermissions() local 186 ldr.getPerms(cs); in testGetPermissions() 227 public Class define(String name, ByteBuffer b, CodeSource cs) { in define() argument 228 return defineClass(name, b, cs); in define() 232 CodeSource cs) { in define() argument 233 return defineClass(name, b, off, len, cs); in define()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 40 public EvilCharsetDecoder(Charset cs) { in EvilCharsetDecoder() argument 41 super(cs, 1.0f, 1.0f); in EvilCharsetDecoder() 62 public EvilCharsetEncoder(Charset cs) { in EvilCharsetEncoder() argument 63 super(cs, 1.0f, 1.0f); in EvilCharsetEncoder() 114 Charset cs = EVIL_CHARSET; in testStringFromCharset_MaliciousCharset() local 116 final String result = new String(bytes, cs); in testStringFromCharset_MaliciousCharset() 132 Charset cs = Charset.forName("UTF-8"); in test_getBytes_UTF_8() local 135 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 138 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 139 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OutputStreamWriterTest.java | 55 char[] cs = new char[8192/4 + 1]; in testFlush() local 56 Arrays.fill(cs, 'x'); in testFlush() 57 cs[cs.length - 1] = '\ud842'; // One half of a surrogate pair (the other being U+df9f). in testFlush() 58 writer.write(cs, 0, cs.length); in testFlush()
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipCoder.java | 37 import sun.nio.cs.ArrayDecoder; 38 import sun.nio.cs.ArrayEncoder; 127 private Charset cs; field in ZipCoder 133 private ZipCoder(Charset cs) { in ZipCoder() argument 134 this.cs = cs; in ZipCoder() 135 this.isUTF8 = cs.name().equals(StandardCharsets.UTF_8.name()); in ZipCoder() 144 dec = cs.newDecoder() in decoder() 153 enc = cs.newEncoder() in encoder()
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
D | StreamDecoder.java | 30 package sun.nio.cs; 78 Charset cs) in forInputStreamReader() argument 80 return new StreamDecoder(in, lock, cs); in forInputStreamReader() 223 private Charset cs; field in StreamDecoder 231 StreamDecoder(InputStream in, Object lock, Charset cs) { in StreamDecoder() argument 233 cs.newDecoder() in StreamDecoder() 240 this.cs = dec.charset(); in StreamDecoder() 261 this.cs = dec.charset(); in StreamDecoder() 392 return ((cs instanceof HistoricallyNamedCharset) in encodingName() 393 ? ((HistoricallyNamedCharset)cs).historicalName() in encodingName() [all …]
|
D | StreamEncoder.java | 29 package sun.nio.cs; 66 Charset cs) in forOutputStreamWriter() argument 68 return new StreamEncoder(out, lock, cs); in forOutputStreamWriter() 161 private Charset cs; field in StreamEncoder 174 private StreamEncoder(OutputStream out, Object lock, Charset cs) { in StreamEncoder() argument 176 cs.newEncoder() in StreamEncoder() 185 this.cs = enc.charset(); in StreamEncoder() 202 this.cs = enc.charset(); in StreamEncoder() 328 return ((cs instanceof HistoricallyNamedCharset) in encodingName() 329 ? ((HistoricallyNamedCharset)cs).historicalName() in encodingName() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | InputStreamReader.java | 30 import sun.nio.cs.StreamDecoder; 112 public InputStreamReader(InputStream in, Charset cs) { in InputStreamReader() argument 114 if (cs == null) in InputStreamReader() 116 sd = StreamDecoder.forInputStreamReader(in, this, cs); in InputStreamReader()
|
D | OutputStreamWriter.java | 30 import sun.nio.cs.StreamEncoder; 129 public OutputStreamWriter(OutputStream out, Charset cs) { in OutputStreamWriter() argument 131 if (cs == null) in OutputStreamWriter() 133 se = StreamEncoder.forOutputStreamWriter(out, this, cs); in OutputStreamWriter()
|
D | Console.java | 31 import sun.nio.cs.StreamDecoder; 32 import sun.nio.cs.StreamEncoder; 368 private Charset cs; field in Console 543 cs = Charset.forName(csname); in Console() 546 if (cs == null) in Console() 547 cs = Charset.defaultCharset(); in Console() 551 cs); in Console() 557 cs)); in Console()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | CodeSignerTest.java | 60 CodeSigner cs = new CodeSigner(cpath, null); in testCodeSigner_01() local 61 assertNotNull(cs); in testCodeSigner_01() 72 CodeSigner cs = new CodeSigner(cpath, ts); in testCodeSigner_02() local 73 assertNotNull(cs); in testCodeSigner_02()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | StringBuilderBenchmark.java | 57 CharSequence cs = "chars"; in timeAppendCharSequence() local 61 sb.append(cs); in timeAppendCharSequence() 67 CharSequence cs = "chars"; in timeAppendSubCharSequence() local 71 sb.append(cs); in timeAppendSubCharSequence()
|