Searched refs:decode (Results 1 - 25 of 115) sorted by relevance

12345

/libcore/luni/src/main/java/java/net/
H A DURLDecoder.java25 * This class is used to decode a string which is encoded in the {@code
41 * @deprecated Use {@link #decode(String, String)} instead.
44 public static String decode(String s) { method in class:URLDecoder
45 return UriCodec.decode(s, true, Charset.defaultCharset(), true);
59 public static String decode(String s, String charsetName) throws UnsupportedEncodingException { method in class:URLDecoder
60 return UriCodec.decode(s, true, Charset.forName(charsetName), true);
H A DJarURLConnection.java69 file = decode(url.getFile());
196 private static String decode(String encoded) throws MalformedURLException { method in class:JarURLConnection
201 return UriCodec.decode(
204 throw new MalformedURLException("Unable to decode URL", e);
/libcore/luni/src/test/java/libcore/java/lang/
H A DIntegerTest.java81 assertEquals(0, Integer.decode("+0").intValue());
82 assertEquals(473, Integer.decode("+473").intValue());
83 assertEquals(255, Integer.decode("+0xFF").intValue());
84 assertEquals(16, Integer.decode("+020").intValue());
85 assertEquals(2147483647, Integer.decode("+2147483647").intValue());
86 assertEquals(-73, Integer.decode("-73").intValue());
87 assertEquals(-255, Integer.decode("-0xFF").intValue());
88 assertEquals(255, Integer.decode("+#FF").intValue());
89 assertEquals(-255, Integer.decode("-#FF").intValue());
92 Integer.decode("
[all...]
H A DLongTest.java108 assertEquals(0, Long.decode("+0").longValue());
109 assertEquals(473, Long.decode("+473").longValue());
110 assertEquals(255, Long.decode("+0xFF").longValue());
111 assertEquals(16, Long.decode("+020").longValue());
112 assertEquals(Long.MAX_VALUE, Long.decode("+" + Long.MAX_VALUE).longValue());
113 assertEquals(-73, Long.decode("-73").longValue());
114 assertEquals(-255, Long.decode("-0xFF").longValue());
115 assertEquals(255, Long.decode("+#FF").longValue());
116 assertEquals(-255, Long.decode("-#FF").longValue());
119 Long.decode("
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
H A DASN1Type.java81 public final Object decode(byte[] encoded) throws IOException { method in class:ASN1Type
82 return decode(new DerInputStream(encoded));
85 public final Object decode(byte[] encoded, int offset, int encodingLen) method in class:ASN1Type
87 return decode(new DerInputStream(encoded, offset, encodingLen));
90 public final Object decode(InputStream in) throws IOException { method in class:ASN1Type
91 return decode(new DerInputStream(in));
97 decode(decoder);
103 decode(decoder);
116 public abstract Object decode(BerInputStream in) throws IOException; method in class:ASN1Type
H A DASN1Explicit.java62 public Object decode(BerInputStream in) throws IOException { method in class:ASN1Explicit
70 in.content = type.decode(in);
H A DASN1Sequence.java39 public Object decode(BerInputStream in) throws IOException { method in class:ASN1Sequence
H A DASN1SequenceOf.java39 public Object decode(BerInputStream in) throws IOException { method in class:ASN1SequenceOf
H A DASN1Set.java39 public Object decode(BerInputStream in) throws IOException { method in class:ASN1Set
H A DASN1SetOf.java39 public Object decode(BerInputStream in) throws IOException { method in class:ASN1SetOf
H A DASN1Boolean.java62 public Object decode(BerInputStream in) throws IOException { method in class:ASN1Boolean
H A DASN1Implicit.java102 public Object decode(BerInputStream in) throws IOException { method in class:ASN1Implicit
116 in.content = type.decode(in);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
H A DURLDecoderTest.java38 * java.net.URLDecoder#decode(java.lang.String)
44 assertTrue("1. Incorrect encoding/decoding", URLDecoder.decode(
46 assertTrue("2. Incorrect encoding/decoding", URLDecoder.decode(
48 assertTrue("3. Incorrect encoding/decoding", URLDecoder.decode(
53 * java.net.URLDecoder#decode(java.lang.String, java.lang.String)
58 URLDecoder.decode("", "");
/libcore/luni/src/test/java/libcore/java/net/
H A DUrlEncodingTest.java35 * URLDecoder and URI disagree on what '+' should decode to.
38 assertEquals("a b", URLDecoder.decode("a+b"));
39 assertEquals("a b", URLDecoder.decode("a+b", "UTF-8"));
50 assertEquals("a b", URLDecoder.decode("a b"));
51 assertEquals("a b", URLDecoder.decode("a b", "UTF-8"));
80 URLDecoder.decode("%");
85 URLDecoder.decode("%0");
101 URLDecoder.decode("%0g");
109 URLDecoder.decode("ab", null);
118 URLDecoder.decode("a
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
H A DCharsetDecoderTest.java199 * Class under test for CharBuffer decode(ByteBuffer)
208 decoder.decode(null);
214 CharBuffer out = decoder.decode(ByteBuffer.allocate(0));
219 out = decoder.decode(in);
227 out = decoder.decode(in);
246 CharBuffer buffer = decoder.decode(in);
255 out = decoder.decode(in);
261 out = decoder.decode(in);
271 decoder.decode(in);
279 out = decoder.decode(i
[all...]
H A DUTF16CharsetEncoderTest.java122 assertEquals(decoder.decode(out), decoder.decode(ByteBuffer
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DByteTest.java277 * java.lang.Byte#decode(String)
280 assertEquals(new Byte((byte) 0), Byte.decode("0"));
281 assertEquals(new Byte((byte) 1), Byte.decode("1"));
282 assertEquals(new Byte((byte) -1), Byte.decode("-1"));
283 assertEquals(new Byte((byte) 0xF), Byte.decode("0xF"));
284 assertEquals(new Byte((byte) 0xF), Byte.decode("#F"));
285 assertEquals(new Byte((byte) 0xF), Byte.decode("0XF"));
286 assertEquals(new Byte((byte) 07), Byte.decode("07"));
289 Byte.decode("9.2");
295 Byte.decode("");
[all...]
H A DShortTest.java62 * java.lang.Short#decode(java.lang.String)
66 // java.lang.Short.decode(java.lang.String)
67 assertTrue("Did not decode -1 correctly", Short.decode("-1")
69 assertTrue("Did not decode -100 correctly", Short.decode("-100")
71 assertTrue("Did not decode 23 correctly", Short.decode("23")
73 assertTrue("Did not decode 0x10 correctly", Short.decode("
[all...]
H A DIntegerTest.java67 * java.lang.Integer#decode(java.lang.String)
71 // java.lang.Integer.decode(java.lang.String)
73 132233, Integer.decode("132233").intValue());
75 07654321, Integer.decode("07654321").intValue());
77 Integer.decode("#1234567").intValue() == 0x1234567);
79 Integer.decode("0xdAd").intValue() == 0xdad);
80 assertEquals("Failed for -23", -23, Integer.decode("-23").intValue());
82 .decode("0").intValue());
83 assertEquals("Returned incorrect value for 0 hex", 0, Integer.decode("0x0")
86 Integer.decode("
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/x509/
H A DSubjectKeyIdentifier.java53 public static SubjectKeyIdentifier decode(byte[] encoding) method in class:SubjectKeyIdentifier
56 ASN1OctetString.getInstance().decode(encoding));
H A DInhibitAnyPolicy.java47 ASN1Integer.getInstance().decode(encoding)).intValue();
/libcore/luni/src/test/java/libcore/java/nio/charset/
H A DCharsetDecoderTest.java36 assertEquals("\u6d61x", d.decode(in).toString());
46 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true);
62 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true);
75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset));
95 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0xe2 }), cb, false);
97 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x98 }), cb, false);
99 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x83 }), cb, false);
101 cr = decoder.decode(ByteBuffer.wrap(new byte[0]), cb, true);
H A DOldCharsetEncoderDecoderBufferTest.java33 * (CharsetDecoderICU) when a decode operation
43 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'a', (byte)'b', (byte)'c', (byte)'d'}),
53 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'x'}), out, true);
58 // check if the first buffer was corrupted by the second decode
65 * (CharsetDecoderICU) when a decode operation
76 decoder.decode(inWithArray, out, false);
83 decoder.decode(inWithoutArray, out, true);
85 // check whether the first buffer was corrupted by the second decode
116 // check whether the second decode corrupted the first buffer
143 // check whether the second decode corrupte
[all...]
/libcore/luni/src/main/java/java/security/
H A DCertificate.java50 public void decode(InputStream stream) throws KeyException, IOException; method in interface:Certificate
54 * {@link #decode(InputStream)} method must be able to decode the format
63 * @see #decode(InputStream)
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
H A DURLEncoderTest.java38 assertTrue("1. Incorrect encoding/decoding", URLDecoder.decode(
40 assertTrue("2. Incorrect encoding/decoding", URLDecoder.decode(
42 assertTrue("3. Incorrect encoding/decoding", URLDecoder.decode(

Completed in 413 milliseconds

12345