Home
last modified time | relevance | path

Searched refs:encode (Results 1 – 25 of 173) sorted by relevance

1234567

/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
DURLEncoderTest.java39 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/
DASCIICharsetEncoderTest.java80 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 …]
DCharsetEncoderTest.java273 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 …]
DCharsetEncoder2Test.java111 cs.encode(CharBuffer.wrap("AB")); in test_EncodeLjava_nio_CharBuffer()
166 CoderResult result = encoder.encode(char1, bytes, false); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB()
171 result = encoder.encode(char2, bytes, true); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB()
203 Charset.forName("UTF-8").encode(CharBuffer.wrap(s)); in testUtf8Encoding()
/libcore/luni/src/test/java/libcore/java/net/
DUrlEncodingTest.java44 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/ojluni/src/main/java/sun/misc/
DCharacterEncoder.java141 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/luni/src/test/java/libcore/libcore/util/
DHexEncodingTest.java25 import static libcore.util.HexEncoding.encode;
65 assertArraysEqual(encodedUpper.toCharArray(), encode(bytes)); in testEncodeBytes()
66 assertArraysEqual(encodedUpper.toCharArray(), encode(bytes, true /* upperCase */)); in testEncodeBytes()
67 assertArraysEqual(encodedUpper.toCharArray(), encode(bytes, 0, bytes.length)); in testEncodeBytes()
68 assertArraysEqual(encodedLower.toCharArray(), encode(bytes, false /* upperCase */)); in testEncodeBytes()
70 assertArraysEqual(bytes, decode(encode(bytes), false /* allowSingleChar */)); in testEncodeBytes()
/libcore/luni/src/main/java/libcore/util/
DHexEncoding.java72 public static char[] encode(byte[] data) { in encode() method in HexEncoding
73 return encode(data, 0, data.length, true /* upperCase */); in encode()
88 public static char[] encode(byte[] data, boolean upperCase) { in encode() method in HexEncoding
89 return encode(data, 0, data.length, upperCase); in encode()
104 public static char[] encode(byte[] data, int offset, int len) { in encode() method in HexEncoding
105 return encode(data, offset, len, true /* upperCase */); in encode()
111 private static char[] encode(byte[] data, int offset, int len, boolean upperCase) { in encode() method in HexEncoding
151 return new String(encode(data, upperCase)); in encodeToString()
/libcore/ojluni/src/main/java/sun/security/pkcs/
DPKCS8Key.java85 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/ojluni/src/main/java/sun/security/x509/
DX509Key.java107 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()
DCertificatePolicyMap.java99 public void encode(DerOutputStream out) throws IOException { in encode() method in CertificatePolicyMap
102 issuerDomain.encode(tmp); in encode()
103 subjectDomain.encode(tmp); in encode()
DCRLDistributionPointsExtension.java202 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()
DAuthorityKeyIdentifierExtension.java92 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()
DCRLNumberExtension.java196 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()
DDistributionPointName.java170 public void encode(DerOutputStream out) throws IOException { in encode() method in DistributionPointName
175 fullName.encode(theChoice); in encode()
181 relativeName.encode(theChoice); in encode()
DCertificateIssuerExtension.java83 names.encode(os); in encodeThis()
182 public void encode(OutputStream out) throws IOException { in encode() method in CertificateIssuerExtension
189 super.encode(tmp); in encode()
DSubjectKeyIdentifierExtension.java79 id.encode(os); in encodeThis()
128 public void encode(OutputStream out) throws IOException { in encode() method in SubjectKeyIdentifierExtension
135 super.encode(tmp); in encode()
DFreshestCRLExtension.java96 public void encode(OutputStream out) throws IOException { in encode() method in FreshestCRLExtension
97 super.encode(out, PKIXExtensions.FreshestCRL_Id, false); in encode()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetEncoderTest.java38 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,
DOldCharsetEncoderDecoderBufferTest.java102 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()
DCharsetDecoderTest.java42 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/annotations/hiddenapi/sun/misc/
DCharacterEncoder.java67 public void encode(java.io.InputStream inStream, java.io.OutputStream outStream) in encode() method in CharacterEncoder
72 public void encode(byte[] aBuffer, java.io.OutputStream aStream) throws java.io.IOException { in encode() method in CharacterEncoder
77 public java.lang.String encode(byte[] aBuffer) { in encode() method in CharacterEncoder
85 public void encode(java.nio.ByteBuffer aBuffer, java.io.OutputStream aStream) in encode() method in CharacterEncoder
90 public java.lang.String encode(java.nio.ByteBuffer aBuffer) { in encode() method in CharacterEncoder
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DCertId.java157 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()
DOCSPRequest.java112 certId.encode(certIdOut); in encodeBytes()
120 ext.encode(extOut); in encodeBytes()
143 hexEnc.encode(bytes) + "\n"); in encodeBytes()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DURLDecoderTest.java45 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()

1234567