/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | CharsetDecoderTest.java | 47 protected static CharsetDecoder decoder; field in CharsetDecoderTest 53 decoder = cs.newDecoder(); in setUp() 70 assertSame(cs, decoder.charset()); in testDefaultValues() 72 decoder.detectedCharset(); in testDefaultValues() 77 assertTrue(decoder.isCharsetDetected()); in testDefaultValues() 81 assertFalse(decoder.isAutoDetecting()); in testDefaultValues() 82 assertSame(CodingErrorAction.REPORT, decoder.malformedInputAction()); in testDefaultValues() 83 assertSame(CodingErrorAction.REPORT, decoder in testDefaultValues() 85 assertEquals(decoder.replacement(), "\ufffd"); in testDefaultValues() 93 decoder = new MockCharsetDecoder(cs, (float) AVER_BYTES, MAX_BYTES); in testCharsetDecoder() [all …]
|
D | CharsetDecoder2Test.java | 185 MockMalformedDecoder decoder = new MockMalformedDecoder(cs); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() local 186 decoder.onMalformedInput(CodingErrorAction.REPLACE); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 187 decoder.replaceWith(replaceString); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 192 CoderResult result = decoder.decode(in, out, false); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 199 result = decoder.decode(in, out, true); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 250 CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); in testInvalidDecoding() local 251 decoder.onMalformedInput(CodingErrorAction.REPORT); in testInvalidDecoding() 252 decoder.onUnmappableCharacter(CodingErrorAction.REPORT); in testInvalidDecoding() 259 CharBuffer cb = decoder.decode(ByteBuffer.wrap(bytes)); in testInvalidDecoding() 272 CharBuffer cb = decoder.decode(bb); in testInvalidDecoding()
|
D | UTF16CharsetEncoderTest.java | 34 private static final CharsetDecoder decoder = CS.newDecoder(); field in UTF16CharsetEncoderTest
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | Base64Test.java | 141 private static void checkDecoder_extraChars_common(Decoder decoder) throws Exception { in checkDecoder_extraChars_common() argument 143 assertDecodeThrowsIAe(decoder, " aGVsbG8sIHdvcmx"); in checkDecoder_extraChars_common() 144 assertDecodeThrowsIAe(decoder, "aGV sbG8sIHdvcmx"); in checkDecoder_extraChars_common() 145 assertDecodeThrowsIAe(decoder, "aGVsbG8sIHdvcmx "); in checkDecoder_extraChars_common() 146 assertDecodeThrowsIAe(decoder, "*aGVsbG8sIHdvcmx"); in checkDecoder_extraChars_common() 147 assertDecodeThrowsIAe(decoder, "aGV*sbG8sIHdvcmx"); in checkDecoder_extraChars_common() 148 assertDecodeThrowsIAe(decoder, "aGVsbG8sIHdvcmx*"); in checkDecoder_extraChars_common() 149 assertDecodeThrowsIAe(decoder, "\r\naGVsbG8sIHdvcmx"); in checkDecoder_extraChars_common() 150 assertDecodeThrowsIAe(decoder, "aGV\r\nsbG8sIHdvcmx"); in checkDecoder_extraChars_common() 151 assertDecodeThrowsIAe(decoder, "aGVsbG8sIHdvcmx\r\n"); in checkDecoder_extraChars_common() [all …]
|
D | LibcoreIoDerivedBase64Test.java | 224 CharsetDecoder decoder = StandardCharsets.US_ASCII.newDecoder(); in bytesToAscii() local 225 decoder.onMalformedInput(CodingErrorAction.REPORT); in bytesToAscii() 226 decoder.onUnmappableCharacter(CodingErrorAction.REPORT); in bytesToAscii() 228 CharBuffer charsBuffer = decoder.decode(bytesBuffer); in bytesToAscii() 265 Decoder decoder = Base64.getDecoder(); in decode() local 267 return decoder.decode(encoded); in decode()
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetDecoderTest.java | 41 CharsetDecoder decoder = Charset.forName("UTF-16").newDecoder(); in test_ByteArray_decode_no_offset() local 45 decoder.reset(); in test_ByteArray_decode_no_offset() 46 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true); in test_ByteArray_decode_no_offset() 48 decoder.flush(outBuffer); in test_ByteArray_decode_no_offset() 55 CharsetDecoder decoder = Charset.forName("UTF-16").newDecoder(); in test_ByteArray_decode_with_offset() local 61 decoder.reset(); in test_ByteArray_decode_with_offset() 62 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true); in test_ByteArray_decode_with_offset() 64 decoder.flush(outBuffer); in test_ByteArray_decode_with_offset() 71 CharsetDecoder decoder = Charset.forName("UTF-16").newDecoder(); in test_ByteArray_decode_with_offset_using_facade_method() local 75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset)); in test_ByteArray_decode_with_offset_using_facade_method() [all …]
|
D | OldCharsetEncoderDecoderBufferTest.java | 38 CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); in testDecoderOutputBuffer() local 43 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'a', (byte)'b', (byte)'c', (byte)'d'}), in testDecoderOutputBuffer() 53 decoder.decode(ByteBuffer.wrap(new byte[]{(byte)'x'}), out, true); in testDecoderOutputBuffer() 70 CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); in testDecoderInputBuffer() local 76 decoder.decode(inWithArray, out, false); in testDecoderInputBuffer() 83 decoder.decode(inWithoutArray, out, true); in testDecoderInputBuffer()
|
D | OldCharset_SingleByteAbstractTest.java | 51 decoder.onMalformedInput(CodingErrorAction.REPLACE); in dumpDecoded() 53 outputCB = decoder.decode(inputBB); in dumpDecoded() 67 decoder.onMalformedInput(CodingErrorAction.REPLACE); in decodeReplace() 68 decoder.onUnmappableCharacter(CodingErrorAction.REPLACE); in decodeReplace() 69 outputCB = decoder.decode(inputBB); in decodeReplace()
|
D | OldCharset_AbstractTest.java | 40 static CharsetDecoder decoder; field in OldCharset_AbstractTest 67 decoder = charset.newDecoder(); in setUp() 130 decoder.onMalformedInput(CodingErrorAction.REPORT); in decode() 131 CharBuffer outputCB = decoder.decode(inputBB); in decode() 154 decoder.onMalformedInput(CodingErrorAction.REPORT); in NNtest_CodecDynamicIndividuals() 166 CharBuffer outputCB = decoder.decode(intermediateBB); in NNtest_CodecDynamicIndividuals() 207 decoder.onMalformedInput(CodingErrorAction.REPORT); in test_CodecDynamic() 208 CharBuffer outputCB = decoder.decode(intermediateBB); in test_CodecDynamic()
|
D | Charset_TestGenerator.java | 32 CharsetDecoder decoder; field in Charset_TestGenerator 235 CharsetDecoder decoder = charset.newDecoder(); in genDecoded() local
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
D | StreamDecoder.java | 226 private CharsetDecoder decoder; field in StreamDecoder 243 this.decoder = dec; in StreamDecoder() 262 this.decoder = dec; in StreamDecoder() 325 CoderResult cr = decoder.flush(cb); in implRead() 347 CoderResult cr = decoder.decode(bb, cb, eof); in implRead() 379 CoderResult cr = decoder.flush(cb); in implRead() 385 decoder.reset(); in implRead()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | InputStreamReaderTest.java | 280 CharsetDecoder decoder = Charset.forName("utf-8").newDecoder(); in test_ConstructorLjava_io_InputStreamLjava_nio_charset_CharsetDecoder() local 282 reader = new InputStreamReader(null, decoder); in test_ConstructorLjava_io_InputStreamLjava_nio_charset_CharsetDecoder() 293 InputStreamReader reader2 = new InputStreamReader(in, decoder); in test_ConstructorLjava_io_InputStreamLjava_nio_charset_CharsetDecoder() 294 assertEquals(Charset.forName(reader2.getEncoding()), decoder.charset()); in test_ConstructorLjava_io_InputStreamLjava_nio_charset_CharsetDecoder() 381 CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); in test_read_1() local 382 decoder.onMalformedInput(CodingErrorAction.REPORT); in test_read_1() 384 new ByteArrayInputStream(new byte[] { -32, -96 }), decoder); in test_read_1()
|
/libcore/ojluni/src/main/java/javax/net/ssl/ |
D | SNIHostName.java | 171 CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder() in SNIHostName() local 176 decoder.decode(ByteBuffer.wrap(encoded)).toString()); in SNIHostName()
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipCoder.java | 47 CharsetDecoder cd = decoder().reset(); in toString() 142 private CharsetDecoder decoder() { in decoder() method in ZipCoder
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StringTest.java | 316 CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder(); in test_69599767() local 317 decoder.onMalformedInput(CodingErrorAction.REPLACE); in test_69599767() 318 assertEquals(expected, decoder.decode(ByteBuffer.wrap(bytes)).toString()); in test_69599767() 454 CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder() in assertFastPathUtf8DecodedEquals() local 458 decoder.decode(ByteBuffer.wrap(hexStringtoBytes(hexString))).toString(), actual); in assertFastPathUtf8DecodedEquals()
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | Files.java | 2783 CharsetDecoder decoder = cs.newDecoder(); 2784 Reader reader = new InputStreamReader(newInputStream(path), decoder);
|
/libcore/ojluni/src/main/java/sun/net/ftp/impl/ |
D | FtpClient.java | 1927 BASE64Decoder decoder = new BASE64Decoder(); in getSecurityData() local 1931 return decoder.decodeBuffer(s.substring(9, s.length() - 1)); in getSecurityData()
|