/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/ |
D | URLEncoderTest.java | 39 URLEncoder.encode(URL)).equals(URL)); in test_encodeLjava_lang_String() 41 URLEncoder.encode(URL2)).equals(URL2)); in test_encodeLjava_lang_String() 43 URLEncoder.encode(URL3)).equals(URL3)); in test_encodeLjava_lang_String() 53 URLEncoder.encode("str", "unknown_enc"); in test_encodeLjava_lang_StringLjava_lang_String() 62 URLEncoder.encode(null, "harmony"); in test_encodeLjava_lang_StringLjava_lang_String() 71 assertEquals("%82%A0", URLEncoder.encode("あ", "Shift_JIS")); in test11571917() 72 assertEquals("%82%A9", URLEncoder.encode("か", "Shift_JIS")); in test11571917() 73 assertEquals("%97%43", URLEncoder.encode("佑", "Shift_JIS")); in test11571917() 74 assertEquals("%24", URLEncoder.encode("$", "Shift_JIS")); in test11571917() 75 assertEquals("%E3%81%8B", URLEncoder.encode("か", "UTF-8")); in test11571917() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCIICharsetEncoderTest.java | 80 encoder.encode(CharBuffer.wrap("\ud800\udc00")); in testMultiStepEncode() 87 encoder.encode(CharBuffer.wrap("\ud800"), out, true)); in testMultiStepEncode() 94 assertSame(CoderResult.UNDERFLOW, encoder.encode(buffer1, out, false)); in testMultiStepEncode() 99 assertTrue(encoder.encode(buffer2, out, true).isUnmappable()); in testMultiStepEncode() 109 ByteBuffer bb = encoder.encode(cb); in testEncodeMapping() 115 encoder.encode(cb); in testEncodeMapping() 122 encoder.encode(cb); in testEncodeMapping() 130 encoder.encode(cb, bb, false); in testEncodeMapping() 132 encoder.encode(cb); in testEncodeMapping() 144 encoder.encode(in, out, false); in testInternalState() [all …]
|
D | CharsetEncoderTest.java | 273 encoder.encode(CharBuffer.wrap("aaa")); in testResetIllegalState() 275 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); in testResetIllegalState() 277 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); in testResetIllegalState() 295 encoder.encode(in, out, true); in testFlushIllegalState() 304 encoder.encode(in, out, false); in testFlushIllegalState() 330 encoder.encode(in); in testEncodeFacadeIllegalState() 334 encoder.encode(in); in testEncodeFacadeIllegalState() 340 encoder.encode(in); in testEncodeFacadeIllegalState() 344 encoder.encode(in); in testEncodeFacadeIllegalState() 349 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), in testEncodeFacadeIllegalState() [all …]
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | UrlEncodingTest.java | 44 assertEquals("a%2Bb", URLEncoder.encode("a+b")); in testEncodingPlus() 45 assertEquals("a%2Bb", URLEncoder.encode("a+b", "UTF-8")); in testEncodingPlus() 60 assertEquals("a+b", URLEncoder.encode("a b")); in testEncodingSpace() 61 assertEquals("a+b", URLEncoder.encode("a b", "UTF-8")); in testEncodingSpace() 127 URLEncoder.encode("ab", null); in testUrlEncoderFailsOnNullCharset() 136 URLEncoder.encode("ab", ""); in testUrlEncoderFailsOnEmptyCharset() 157 URLEncoder.encode("ab", "no-such-charset"); in testUrlEncoderFailsOnInvalidCharset() 213 assertEquals("%00", URLEncoder.encode("\u0000", "UTF-8")); in testUrlEncoderEncodesNonPrintableNonAsciiCharacters() 214 assertEquals("%00", URLEncoder.encode("\u0000")); in testUrlEncoderEncodesNonPrintableNonAsciiCharacters() 215 assertEquals("%E2%82%AC", URLEncoder.encode("\u20AC", "UTF-8")); in testUrlEncoderEncodesNonPrintableNonAsciiCharacters() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | ModifiedUtf8Test.java | 246 assertTrue(Arrays.equals(new byte[]{0, 1, 'A'}, ModifiedUtf8.encode("A"))); in test_encode() 247 assertTrue(Arrays.equals(new byte[] { 0, 3, 'A', 'B', 'C' }, ModifiedUtf8.encode("ABC"))); in test_encode() 249 ModifiedUtf8.encode("A\u00a0"))); in test_encode() 251 ModifiedUtf8.encode("A\u0830"))); in test_encode() 253 ModifiedUtf8.encode("A\u00a6"))); in test_encode() 255 ModifiedUtf8.encode("A\u00bf"))); in test_encode() 257 ModifiedUtf8.encode("A\u0606"))); in test_encode() 259 ModifiedUtf8.encode("A\u07ff"))); in test_encode() 261 ModifiedUtf8.encode("A\u0800"))); in test_encode() 263 ModifiedUtf8.encode("A\u31c6"))); in test_encode() [all …]
|
D | CharsetEncoderTest.java | 38 String output = ascii.decode(e.encode(CharBuffer.wrap(input))).toString(); in test_replaceWith() 72 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842', '\udf9f' }), bb, false); in testSurrogatePairAllAtOnce() 86 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testMalformedSurrogatePair() 123 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842' }), bb, false); in testCharsetEncoderSplitSurrogates() 126 cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testCharsetEncoderSplitSurrogates() 135 cr = e.encode(CharBuffer.wrap(new char[] { }), bb, true); in testCharsetEncoderSplitSurrogates() 147 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { 'x' }), bb, false); in testFlushWithoutEndOfInput() 159 cr = e.encode(CharBuffer.wrap(new char[] { 'x' }), bb, true); in testFlushWithoutEndOfInput() 207 CoderResult cr = e.encode(CharBuffer.allocate(0), bb, true); 224 CoderResult result = encoder.encode(CharBuffer.wrap("\ud800"), output,
|
D | OldCharsetEncoderDecoderBufferTest.java | 102 encoder.encode(CharBuffer.wrap("ab"), out, false); in testEncoderOutputBuffer() 114 encoder.encode(CharBuffer.wrap("x"), out, true); in testEncoderOutputBuffer() 134 encoder.encode(inWithArray, out, false); in testEncoderInputBuffer() 141 encoder.encode(inWithoutArray, out, true); in testEncoderInputBuffer()
|
D | CharsetDecoderTest.java | 42 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_no_offset() 56 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_with_offset() 72 byte[] arr = encode("UTF-16", "Android"); in test_ByteArray_decode_with_offset_using_facade_method() 86 private static byte[] encode(String charsetName, String s) throws Exception { in encode() method in CharsetDecoderTest 88 ByteBuffer buf = encoder.encode(CharBuffer.wrap(s)); in encode()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | CharacterEncoder.java | 141 public void encode(InputStream inStream, OutputStream outStream) in encode() method in CharacterEncoder 176 public void encode(byte aBuffer[], OutputStream aStream) in encode() method in CharacterEncoder 179 encode(inStream, aStream); in encode() 186 public String encode(byte aBuffer[]) { in encode() method in CharacterEncoder 191 encode(inStream, outStream); in encode() 253 public void encode(ByteBuffer aBuffer, OutputStream aStream) in encode() method in CharacterEncoder 256 encode(buf, aStream); in encode() 265 public String encode(ByteBuffer aBuffer) { in encode() method in CharacterEncoder 267 return encode(buf); in encode()
|
/libcore/ojluni/src/main/java/sun/security/pkcs/ |
D | PKCS8Key.java | 85 encode(); in PKCS8Key() 160 encode(); in parseKeyBits() 177 encode(pkcs8EncodedKeyStream, algid, key); in buildPKCS8Key() 261 public final void encode(DerOutputStream out) throws IOException in encode() method in PKCS8Key 263 encode(out, this.algid, this.key); in encode() 272 result = encode(); in getEncoded() 290 public byte[] encode() throws InvalidKeyException { in encode() method in PKCS8Key 296 encode (out); in encode() 386 static void encode(DerOutputStream out, AlgorithmId algid, byte[] key) in encode() method in PKCS8Key 390 algid.encode(tmp); in encode()
|
/libcore/luni/src/test/java/libcore/net/ |
D | UriCodecTest.java | 171 assertEquals("", CODEC.encode("", StandardCharsets.UTF_8)); in testEncode_emptyString_returnsEmptyString() 175 assertEquals("ab%2F$%C4%82%2512", CODEC.encode("ab/$\u0102%12", StandardCharsets.UTF_8)); in testEncode() 181 CODEC.encode("ab/$\u0102%12 ", StandardCharsets.UTF_8)); in testEncode_convertWhitespace() 191 withWhitespaceRetained.encode("ab/$\u0102%12 ", StandardCharsets.UTF_8)); in testEncode_convertWhitespace() 203 assertEquals("ab%34%20", withPercentRetained.encode("ab%34 ", StandardCharsets.UTF_8)); in testEncode_percentRetained() 236 CODEC.encode("ab/$\u0102%\u0840", StandardCharsets.UTF_8)); in testEncode_lastCharacter() 248 withSpaceRetained.encode("/ ", StandardCharsets.UTF_8)); in testEncode_flushBufferBeforePlusFromSpace()
|
/libcore/ojluni/src/main/java/sun/security/x509/ |
D | X509Key.java | 107 encode(); in X509Key() 197 encode(); in parseKeyBits() 214 encode(x509EncodedKeyStream, algid, key); in buildX509Key() 298 public final void encode(DerOutputStream out) throws IOException in encode() method in X509Key 300 encode(out, this.algid, getKey()); in encode() 320 encode(out); in getEncodedInternal() 343 public byte[] encode() throws InvalidKeyException { in encode() method in X509Key 470 static void encode(DerOutputStream out, AlgorithmId algid, BitArray key) in encode() method in X509Key 473 algid.encode(tmp); in encode()
|
D | CertificatePolicyMap.java | 99 public void encode(DerOutputStream out) throws IOException { in encode() method in CertificatePolicyMap 102 issuerDomain.encode(tmp); in encode() 103 subjectDomain.encode(tmp); in encode()
|
D | CRLDistributionPointsExtension.java | 202 public void encode(OutputStream out) throws IOException { in encode() method in CRLDistributionPointsExtension 203 encode(out, PKIXExtensions.CRLDistributionPoints_Id, false); in encode() 210 protected void encode(OutputStream out, ObjectIdentifier extensionId, in encode() method in CRLDistributionPointsExtension 219 super.encode(tmp); in encode() 286 point.encode(pnts); in encodeThis()
|
D | AuthorityKeyIdentifierExtension.java | 92 id.encode(tmp1); in encodeThis() 99 names.encode(tmp1); in encodeThis() 108 serialNum.encode(tmp1); in encodeThis() 218 public void encode(OutputStream out) throws IOException { in encode() method in AuthorityKeyIdentifierExtension 225 super.encode(tmp); in encode() 317 id.encode(derOut); in getEncodedKeyIdentifier()
|
D | FreshestCRLExtension.java | 96 public void encode(OutputStream out) throws IOException { in encode() method in FreshestCRLExtension 97 super.encode(out, PKIXExtensions.FreshestCRL_Id, false); in encode()
|
D | CRLNumberExtension.java | 196 public void encode(OutputStream out) throws IOException { in encode() method in CRLNumberExtension 198 encode(out, PKIXExtensions.CRLNumber_Id, true); in encode() 205 protected void encode(OutputStream out, ObjectIdentifier extensionId, in encode() method in CRLNumberExtension 215 super.encode(tmp); in encode()
|
D | CertificateIssuerExtension.java | 83 names.encode(os); in encodeThis() 182 public void encode(OutputStream out) throws IOException { in encode() method in CertificateIssuerExtension 189 super.encode(tmp); in encode()
|
D | SubjectKeyIdentifierExtension.java | 79 id.encode(os); in encodeThis() 128 public void encode(OutputStream out) throws IOException { in encode() method in SubjectKeyIdentifierExtension 135 super.encode(tmp); in encode()
|
/libcore/luni/src/main/java/libcore/util/ |
D | HexEncoding.java | 32 public static char[] encode(byte[] data) { in encode() method in HexEncoding 33 return encode(data, 0, data.length); in encode() 39 public static char[] encode(byte[] data, int offset, int len) { in encode() method in HexEncoding 55 return new String(encode(data)); in encodeToString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | URLDecoderTest.java | 45 URLEncoder.encode(URL)).equals(URL)); in test_decodeLjava_lang_String() 47 URLEncoder.encode(URL2)).equals(URL2)); in test_decodeLjava_lang_String() 49 URLEncoder.encode(URL3)).equals(URL3)); in test_decodeLjava_lang_String()
|
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
D | CertId.java | 157 public void encode(DerOutputStream out) throws IOException { in encode() method in CertId 160 hashAlgId.encode(tmp); in encode() 163 certSerialNumber.encode(tmp); in encode() 169 encoder.encode(out.toByteArray())); in encode() 229 sb.append(encoder.encode(issuerNameHash)); in toString() 231 sb.append(encoder.encode(issuerKeyHash)); in toString()
|
D | OCSPRequest.java | 112 certId.encode(certIdOut); in encodeBytes() 120 ext.encode(extOut); in encodeBytes() 143 hexEnc.encode(bytes) + "\n"); in encodeBytes()
|
/libcore/luni/src/test/java/libcore/util/ |
D | HexEncodingTest.java | 23 import static libcore.util.HexEncoding.encode; 29 assertArraysEqual("61766F6361646F73".toCharArray(), encode(avocados)); in testEncode() 30 assertArraysEqual(avocados, decode(encode(avocados), false)); in testEncode()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StringCoding.java | 306 byte[] encode(char[] ca, int off, int len) { in encode() method in StringCoding.StringEncoder 312 int blen = ((ArrayEncoder)ce).encode(ca, off, len, ba); in encode() 320 CoderResult cr = ce.encode(cb.asReadOnlyBuffer(), bb, true); in encode() 336 static byte[] encode(String charsetName, char[] ca, int off, int len) in encode() method in StringCoding 353 return se.encode(ca, off, len); in encode() 356 static byte[] encode(Charset cs, char[] ca, int off, int len) { in encode() method in StringCoding 373 int blen = ((ArrayEncoder)ce).encode(ca, off, len, ba); in encode() 380 CoderResult cr = ce.encode(cb.asReadOnlyBuffer(), bb, true); in encode() 393 static byte[] encode(char[] ca, int off, int len) { in encode() method in StringCoding 397 return encode(csn, ca, off, len); in encode() [all …]
|