/libcore/ojluni/src/main/java/sun/misc/ |
D | Version.java | 274 CharSequence cs = System.getProperty("java.vm.version"); in initVersions() local 275 if (cs.length() >= 5 && in initVersions() 276 Character.isDigit(cs.charAt(0)) && cs.charAt(1) == '.' && in initVersions() 277 Character.isDigit(cs.charAt(2)) && cs.charAt(3) == '.' && in initVersions() 278 Character.isDigit(cs.charAt(4))) { in initVersions() 279 jvm_major_version = Character.digit(cs.charAt(0), 10); in initVersions() 280 jvm_minor_version = Character.digit(cs.charAt(2), 10); in initVersions() 281 jvm_micro_version = Character.digit(cs.charAt(4), 10); in initVersions() 282 cs = cs.subSequence(5, cs.length()); in initVersions() 283 if (cs.charAt(0) == '_' && cs.length() >= 3) { in initVersions() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | ExecutorCompletionServiceTest.java | 88 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testSubmitNullCallable() local 90 cs.submit((Callable) null); in testSubmitNullCallable() 99 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testSubmitNullRunnable() local 101 cs.submit((Runnable) null, Boolean.TRUE); in testSubmitNullRunnable() 111 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testTake() local 112 cs.submit(new StringTask()); in testTake() 113 Future f = cs.take(); in testTake() 122 CompletionService cs = new ExecutorCompletionService(cachedThreadPool); in testTake2() local 123 Future f1 = cs.submit(new StringTask()); in testTake2() 124 Future f2 = cs.take(); in testTake2() [all …]
|
D | ExecutorCompletionService9Test.java | 63 CompletionService<Integer> cs in solveAll() local 65 solvers.forEach(cs::submit); in solveAll() 67 Integer r = cs.take().get(); in solveAll() 76 CompletionService<Integer> cs in solveAny() local 82 solvers.forEach(solver -> futures.add(cs.submit(solver))); in solveAny() 85 Integer r = cs.take().get(); in solveAny()
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | Charset.java | 50 import sun.nio.cs.ThreadLocalCoders; 333 private static void cache(String charsetName, Charset cs) { in cache() argument 335 String canonicalName = cs.name(); in cache() 339 cs = canonicalCharset; in cache() 341 cache2.put(canonicalName, cs); in cache() 343 for (String alias : cs.aliases()) { in cache() 344 cache2.put(alias, cs); in cache() 348 cache2.put(charsetName, cs); in cache() 351 cache1 = new AbstractMap.SimpleImmutableEntry<>(charsetName, cs); in cache() 432 Charset cs = cp.charsetForName(charsetName); in lookupViaProviders() local [all …]
|
D | CharsetEncoder.java | 187 CharsetEncoder(Charset cs, in CharsetEncoder() argument 193 this(cs, averageBytesPerChar, maxBytesPerChar, replacement, false); in CharsetEncoder() 202 …protected CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] repl… in CharsetEncoder() argument 206 this.charset = cs; in CharsetEncoder() 249 protected CharsetEncoder(Charset cs, in CharsetEncoder() argument 253 this(cs, in CharsetEncoder() 1007 public boolean canEncode(CharSequence cs) { in canEncode() argument 1009 if (cs instanceof CharBuffer) in canEncode() 1010 cb = ((CharBuffer)cs).duplicate(); in canEncode() 1014 cb = CharBuffer.wrap(cs); in canEncode()
|
/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 | 48 Charset cs = Charset.forName(charsetName); in test_allAvailableCharsets() local 49 assertNotNull(cs.newDecoder()); in test_allAvailableCharsets() 50 if (cs.canEncode()) { in test_allAvailableCharsets() 51 CharsetEncoder enc = cs.newEncoder(); in test_allAvailableCharsets() 83 Charset cs = Charset.forName(name); in test_isRegistered() local 84 if (!cs.isRegistered()) { in test_isRegistered() 85 … System.err.println("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases()); in test_isRegistered() 87 …assertTrue("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() 91 Charset cs = Charset.forName(name); in test_isRegistered() local 92 …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 …]
|
D | CharsetDecoderTest.java | 44 Charset cs = MOCKCS; field in CharsetDecoderTest 53 decoder = cs.newDecoder(); in setUp() 70 assertSame(cs, decoder.charset()); in testDefaultValues() 93 decoder = new MockCharsetDecoder(cs, (float) AVER_BYTES, MAX_BYTES); in testCharsetDecoder() 96 CharsetDecoder ec = new MockCharsetDecoder(cs, 1, MAX_BYTES); in testCharsetDecoder() 97 assertSame(ec.charset(), cs); in testCharsetDecoder() local 121 ec = new MockCharsetDecoder(cs, 0, MAX_BYTES); in testCharsetDecoder() 126 ec = new MockCharsetDecoder(cs, 1, 0); in testCharsetDecoder() 133 ec = new MockCharsetDecoder(cs, -1, MAX_BYTES); in testCharsetDecoder() 138 ec = new MockCharsetDecoder(cs, 1, -1); in testCharsetDecoder() [all …]
|
/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/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/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/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/luni/src/test/java/tests/java/security/ |
D | SecureClassLoaderTest.java | 191 CodeSource cs = new CodeSource(url, (Certificate[]) null); in testGetPermissions() local 194 ldr.getPerms(cs); in testGetPermissions() 235 public Class define(String name, ByteBuffer b, CodeSource cs) { in define() argument 236 return defineClass(name, b, cs); in define() 240 CodeSource cs) { in define() argument 241 return defineClass(name, b, off, len, cs); in define()
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
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 …]
|
D | StreamDecoder.java | 30 package sun.nio.cs; 79 Charset cs) in forInputStreamReader() argument 81 return new StreamDecoder(in, lock, cs); in forInputStreamReader() 225 private Charset cs; field in StreamDecoder 233 StreamDecoder(InputStream in, Object lock, Charset cs) { in StreamDecoder() argument 235 cs.newDecoder() in StreamDecoder() 242 this.cs = dec.charset(); in StreamDecoder() 263 this.cs = dec.charset(); in StreamDecoder() 401 return ((cs instanceof HistoricallyNamedCharset) in encodingName() 402 ? ((HistoricallyNamedCharset)cs).historicalName() in encodingName() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 48 public EvilCharsetDecoder(Charset cs) { in EvilCharsetDecoder() argument 49 super(cs, 1.0f, 1.0f); in EvilCharsetDecoder() 70 public EvilCharsetEncoder(Charset cs) { in EvilCharsetEncoder() argument 71 super(cs, 1.0f, 1.0f); in EvilCharsetEncoder() 122 Charset cs = EVIL_CHARSET; in testStringFromCharset_MaliciousCharset() local 124 final String result = new String(bytes, cs); in testStringFromCharset_MaliciousCharset() 140 Charset cs = Charset.forName("UTF-8"); in test_getBytes_UTF_8() local 143 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 146 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 147 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() [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; 370 private Charset cs; field in Console 545 cs = Charset.forName(csname); in Console() 548 if (cs == null) in Console() 549 cs = Charset.defaultCharset(); in Console() 553 cs); in Console() 559 cs)); in Console()
|
/libcore/ojluni/annotations/hiddenapi/sun/nio/cs/ |
D | ThreadLocalCoders.java | 26 package sun.nio.cs; 46 private static sun.nio.cs.ThreadLocalCoders.Cache decoderCache; 48 private static sun.nio.cs.ThreadLocalCoders.Cache encoderCache;
|