/libcore/luni/src/main/java/java/security/ |
D | SecureClassLoader.java | 92 CodeSource cs) { in defineClass() argument 93 return cs == null ? defineClass(name, b, off, len) : defineClass(name, in defineClass() 94 b, off, len, getPD(cs)); in defineClass() 115 protected final Class<?> defineClass(String name, ByteBuffer b, CodeSource cs) { in defineClass() argument 119 return cs == null ? defineClass(name, data, 0, data.length) in defineClass() 120 : defineClass(name, data, 0, data.length, getPD(cs)); in defineClass() 129 private ProtectionDomain getPD(CodeSource cs) { in getPD() argument 130 if (cs == null) { in getPD() 137 if ((pd = pds.get(cs)) != null) { in getPD() 140 PermissionCollection perms = getPermissions(cs); in getPD() [all …]
|
D | ProtectionDomain.java | 24 public ProtectionDomain(CodeSource cs, PermissionCollection permissions) { } in ProtectionDomain() argument 26 …public ProtectionDomain(CodeSource cs, PermissionCollection permissions, ClassLoader cl, Principal… in ProtectionDomain() argument
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetTest.java | 54 Charset cs = Charset.forName(charsetName); in test_allAvailableCharsets() local 55 assertNotNull(cs.newDecoder()); in test_allAvailableCharsets() 56 if (cs.canEncode()) { in test_allAvailableCharsets() 57 CharsetEncoder enc = cs.newEncoder(); in test_allAvailableCharsets() 89 Charset cs = Charset.forName(name); in test_isRegistered() local 90 if (!cs.isRegistered()) { in test_isRegistered() 91 … System.err.println("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases()); in test_isRegistered() 93 …assertTrue("isRegistered was false for " + name + " " + cs.name() + " " + cs.aliases(), cs.isRegis… in test_isRegistered() 97 Charset cs = Charset.forName(name); in test_isRegistered() local 98 …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 …]
|
D | ASCIICharsetEncoderTest.java | 33 private final Charset cs = Charset.forName("ascii"); field in ASCIICharsetEncoderTest 34 private final CharsetEncoder encoder = cs.newEncoder(); 152 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_Reset() 185 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_Encoding() 242 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_Encoding_END() 297 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_Flushed() 362 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_Encode() 409 CharsetEncoder newEncoder = cs.newEncoder(); in testInternalState_from_Encode()
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | Charset.java | 233 Charset cs = it.next(); in availableCharsets() local 235 if (!charsets.containsKey(cs.name())) { in availableCharsets() 236 charsets.put(cs.name(), cs); in availableCharsets() local 244 private static Charset cacheCharset(String charsetName, Charset cs) { in cacheCharset() argument 247 String canonicalName = cs.name(); in cacheCharset() 250 canonicalCharset = cs; in cacheCharset() 263 for (String alias : cs.aliasesSet) { in cacheCharset() 282 Charset cs; in forName() local 284 cs = CACHED_CHARSETS.get(charsetName); in forName() 285 if (cs != null) { in forName() [all …]
|
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()
|
D | CharsetEncoder.java | 103 protected CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar) { in CharsetEncoder() argument 104 this(cs, averageBytesPerChar, maxBytesPerChar, new byte[] { (byte) '?' }); in CharsetEncoder() 128 …protected CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] repl… in CharsetEncoder() argument 129 this(cs, averageBytesPerChar, maxBytesPerChar, replacement, false); in CharsetEncoder() 132 …CharsetEncoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] replacement, b… in CharsetEncoder() argument 139 this.charset = cs; in CharsetEncoder()
|
D | CharsetDecoderICU.java | 50 public static CharsetDecoderICU newInstance(Charset cs, String icuCanonicalName) { in newInstance() argument 57 CharsetDecoderICU result = new CharsetDecoderICU(cs, averageCharsPerByte, address); in newInstance() 68 private CharsetDecoderICU(Charset cs, float averageCharsPerByte, long address) { in CharsetDecoderICU() argument 69 super(cs, averageCharsPerByte, MAX_CHARS_PER_BYTE); in CharsetDecoderICU()
|
D | CharsetEncoderICU.java | 65 public static CharsetEncoderICU newInstance(Charset cs, String icuCanonicalName) { in newInstance() argument 74 …CharsetEncoderICU result = new CharsetEncoderICU(cs, averageBytesPerChar, maxBytesPerChar, replace… in newInstance() 94 …private CharsetEncoderICU(Charset cs, float averageBytesPerChar, float maxBytesPerChar, byte[] rep… in CharsetEncoderICU() argument 95 super(cs, averageBytesPerChar, maxBytesPerChar, replacement, true); in CharsetEncoderICU()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 42 public EvilCharsetDecoder(Charset cs) { in EvilCharsetDecoder() argument 43 super(cs, 1.0f, 1.0f); in EvilCharsetDecoder() 64 public EvilCharsetEncoder(Charset cs) { in EvilCharsetEncoder() argument 65 super(cs, 1.0f, 1.0f); in EvilCharsetEncoder() 116 Charset cs = EVIL_CHARSET; in testStringFromCharset_MaliciousCharset() local 118 final String result = new String(bytes, cs); in testStringFromCharset_MaliciousCharset() 134 Charset cs = Charset.forName("UTF-8"); in test_getBytes_UTF_8() local 137 assertEquals("[]", Arrays.toString("".getBytes(cs))); in test_getBytes_UTF_8() 140 assertEquals("[0]", Arrays.toString("\u0000".getBytes(cs))); in test_getBytes_UTF_8() 141 assertEquals("[127]", Arrays.toString("\u007f".getBytes(cs))); in test_getBytes_UTF_8() [all …]
|
/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/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()
|
D | OldOutputStreamWriterTest.java | 126 Charset cs = Charset.forName("ascii"); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_Charset() local 129 writer = new OutputStreamWriter(null, cs); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_Charset() 142 writer = new OutputStreamWriter(out, cs); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_Charset() 144 cs, Charset.forName(writer.getEncoding())); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_Charset() 152 Charset cs = Charset.forName("ascii"); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_CharsetEncoder() local 153 CharsetEncoder enc = cs.newEncoder(); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_CharsetEncoder() 169 writer = new OutputStreamWriter(out, cs); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_CharsetEncoder() 171 cs, Charset.forName(writer.getEncoding())); in test_ConstructorLjava_io_OutputStreamLjava_nio_charset_CharsetEncoder()
|
/libcore/luni/src/test/java/libcore/icu/ |
D | AlphabeticIndexTest.java | 81 AlphabeticIndex.ImmutableIndex cs = createIndex(new Locale("cs")); in test_cs() local 82 assertHasLabel(cs, "Cena", "C"); in test_cs() 83 assertHasLabel(cs, "Čáp", "\u010c"); in test_cs() 84 assertHasLabel(cs, "Ruda", "R"); in test_cs() 85 assertHasLabel(cs, "Řada", "\u0158"); in test_cs() 86 assertHasLabel(cs, "Selka", "S"); in test_cs() 87 assertHasLabel(cs, "Šála", "\u0160"); in test_cs() 88 assertHasLabel(cs, "Zebra", "Z"); in test_cs() 89 assertHasLabel(cs, "Žába", "\u017d"); in test_cs() 90 assertHasLabel(cs, "Chata", "CH"); in test_cs()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetEncoderTest.java | 67 Charset cs = Charset.forName("UTF-32BE"); in testSurrogatePairAllAtOnce() local 68 CharsetEncoder e = cs.newEncoder(); in testSurrogatePairAllAtOnce() 81 Charset cs = Charset.forName("UTF-32BE"); in testMalformedSurrogatePair() local 82 CharsetEncoder e = cs.newEncoder(); in testMalformedSurrogatePair() 116 Charset cs = Charset.forName("UTF-32BE"); in testCharsetEncoderSplitSurrogates() local 117 CharsetEncoder e = cs.newEncoder(); in testCharsetEncoderSplitSurrogates() 142 Charset cs = Charset.forName("UTF-32BE"); in testFlushWithoutEndOfInput() local 143 CharsetEncoder e = cs.newEncoder(); in testFlushWithoutEndOfInput()
|
/libcore/luni/src/main/java/java/nio/ |
D | CharBuffer.java | 130 public static CharBuffer wrap(CharSequence cs, int start, int end) { in wrap() argument 131 if (start < 0 || end < start || end > cs.length()) { in wrap() 132 …throw new IndexOutOfBoundsException("cs.length()=" + cs.length() + ", start=" + start + ", end=" +… in wrap() 134 CharBuffer result = new CharSequenceAdapter(cs); in wrap() 700 CharSequence cs = csq.subSequence(start, end); in append() local 701 if (cs.length() > 0) { in append() 702 return put(cs.toString()); in append()
|
/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/luni/src/main/java/java/util/zip/ |
D | CheckedOutputStream.java | 43 public CheckedOutputStream(OutputStream os, Checksum cs) { in CheckedOutputStream() argument 45 check = cs; in CheckedOutputStream()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | OldAndroidLocaleTest.java | 165 Charset cs = Charset.forName(encoding); in testICUConverters() local 166 Set<String> aliases = cs.aliases(); in testICUConverters() 167 System.out.println(cs.name() + ": " + aliases); in testICUConverters()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | OutputStreamWriterTest.java | 351 Charset cs = Charset.forName("ascii"); in testOutputStreamWriterOutputStreamCharset() local 353 writer = new OutputStreamWriter(null, cs); in testOutputStreamWriterOutputStreamCharset() 364 OutputStreamWriter writer2 = new OutputStreamWriter(out, cs); in testOutputStreamWriterOutputStreamCharset() 365 assertEquals(cs, Charset.forName(writer2.getEncoding())); in testOutputStreamWriterOutputStreamCharset() 374 Charset cs = Charset.forName("ascii"); in testOutputStreamWriterOutputStreamCharsetEncoder() local 375 CharsetEncoder enc = cs.newEncoder(); in testOutputStreamWriterOutputStreamCharsetEncoder() 389 assertEquals(cs, Charset.forName(writer2.getEncoding())); in testOutputStreamWriterOutputStreamCharsetEncoder() 394 Charset cs = Charset.forName("utf-8"); in testGetEncoding() local 395 assertEquals(cs, Charset.forName(writer.getEncoding())); in testGetEncoding()
|