/libcore/luni/src/test/java/libcore/java/io/ |
D | OldCharArrayReaderTest.java | 27 CharArrayReader cr; field in OldCharArrayReaderTest 36 cr = new CharArrayReader(hw); in test_Constructor$C() 37 assertTrue("Failed to create reader", cr.ready()); in test_Constructor$C() 48 cr = new CharArrayReader(null, 0, 0); in test_Constructor$CII() 54 cr = new CharArrayReader(hw, -1, 0); in test_Constructor$CII() 60 cr = new CharArrayReader(hw, 0, -1); in test_Constructor$CII() 66 cr = new CharArrayReader(hw, hw.length + 1, 1); in test_Constructor$CII() 72 cr = new CharArrayReader(hw, 5, 5); in test_Constructor$CII() 73 assertTrue("Test 5: Failed to create reader", cr.ready()); in test_Constructor$CII() 75 'W', cr.read()); in test_Constructor$CII() [all …]
|
D | OldCharArrayWriterTest.java | 29 CharArrayReader cr; field in OldCharArrayWriterTest 135 if (cr != null) { in tearDown() 136 cr.close(); in tearDown()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | CharArrayReaderTest.java | 27 CharArrayReader cr; field in CharArrayReaderTest 33 cr = new CharArrayReader(hw); in test_Constructor$C() 34 assertTrue("Failed to create reader", cr.ready()); in test_Constructor$C() 41 cr = new CharArrayReader(hw, 5, 5); in test_Constructor$CII() 42 assertTrue("Failed to create reader", cr.ready()); in test_Constructor$CII() 44 int c = cr.read(); in test_Constructor$CII() 53 cr = new CharArrayReader(hw); in test_close() 54 cr.close(); in test_close() 56 cr.read(); in test_close() 63 cr.close(); in test_close() [all …]
|
D | CharArrayWriterTest.java | 31 CharArrayReader cr; field in CharArrayWriterTest 70 cr = new CharArrayReader(cw.toCharArray()); in test_reset() 72 cr.read(c, 0, 5); in test_reset() 91 cr = new CharArrayReader(cw.toCharArray()); in test_toCharArray() 93 cr.read(c, 0, 10); in test_toCharArray() 103 cr = new CharArrayReader(cw.toCharArray()); in test_toString() 112 cr = new CharArrayReader(cw.toCharArray()); in test_write$CII() 114 cr.read(c, 0, 5); in test_write$CII() 137 cr = new CharArrayReader(cw.toCharArray()); in test_writeI() 138 assertEquals("Writer failed to write char", 'T', cr.read()); in test_writeI() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | CharsetEncoderTest.java | 72 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842', '\udf9f' }), bb, false); in testSurrogatePairAllAtOnce() local 73 assertEquals(CoderResult.UNDERFLOW, cr); in testSurrogatePairAllAtOnce() 86 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testMalformedSurrogatePair() local 87 assertTrue(cr.toString(), cr.isMalformed()); in testMalformedSurrogatePair() 88 assertEquals(1, cr.length()); in testMalformedSurrogatePair() 123 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842' }), bb, false); in testCharsetEncoderSplitSurrogates() local 124 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates() 126 cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); in testCharsetEncoderSplitSurrogates() 127 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates() 135 cr = e.encode(CharBuffer.wrap(new char[] { }), bb, true); in testCharsetEncoderSplitSurrogates() [all …]
|
D | CharsetDecoderTest.java | 98 CoderResult cr; in testUtf8BytesSplitAcrossMultipleWrites() local 99 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0xe2 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 100 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites() 101 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x98 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 102 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites() 103 cr = decoder.decode(ByteBuffer.wrap(new byte[] { (byte) 0x83 }), cb, false); in testUtf8BytesSplitAcrossMultipleWrites() 104 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites() 105 cr = decoder.decode(ByteBuffer.wrap(new byte[0]), cb, true); in testUtf8BytesSplitAcrossMultipleWrites() 106 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites() 107 cr = decoder.flush(cb); in testUtf8BytesSplitAcrossMultipleWrites() [all …]
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | CharsetDecoder.java | 579 CoderResult cr; in decode() local 581 cr = decodeLoop(in, out); in decode() 588 if (cr.isOverflow()) in decode() 589 return cr; in decode() 591 if (cr.isUnderflow()) { in decode() 593 cr = CoderResult.malformedForLength(in.remaining()); in decode() 596 return cr; in decode() 601 if (cr.isMalformed()) in decode() 603 else if (cr.isUnmappable()) in decode() 606 assert false : cr.toString(); in decode() [all …]
|
D | CharsetEncoder.java | 373 CoderResult cr = dec.decode(bb, cb, true); in isLegalReplacement() local 374 return !cr.isError(); in isLegalReplacement() 597 CoderResult cr; in encode() local 599 cr = encodeLoop(in, out); in encode() 606 if (cr.isOverflow()) in encode() 607 return cr; in encode() 609 if (cr.isUnderflow()) { in encode() 611 cr = CoderResult.malformedForLength(in.remaining()); in encode() 614 return cr; in encode() 619 if (cr.isMalformed()) in encode() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipCoder.java | 63 CoderResult cr = cd.decode(bb, cb, true); in toString() local 64 if (!cr.isUnderflow()) in toString() 65 throw new IllegalArgumentException(cr.toString()); in toString() 66 cr = cd.flush(cb); in toString() 67 if (!cr.isUnderflow()) in toString() 68 throw new IllegalArgumentException(cr.toString()); in toString() 93 CoderResult cr = ce.encode(cb, bb, true); in getBytes() local 94 if (!cr.isUnderflow()) in getBytes() 95 throw new IllegalArgumentException(cr.toString()); in getBytes() 96 cr = ce.flush(bb); in getBytes() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/cs/ |
D | StreamEncoder.java | 242 CoderResult cr = encoder.encode(lcb, bb, endOfInput); in flushLeftoverChar() local 243 if (cr.isUnderflow()) { in flushLeftoverChar() 252 if (cr.isOverflow()) { in flushLeftoverChar() 257 cr.throwException(); in flushLeftoverChar() 271 CoderResult cr = encoder.encode(cb, bb, false); in implWrite() local 272 if (cr.isUnderflow()) { in implWrite() 280 if (cr.isOverflow()) { in implWrite() 285 cr.throwException(); in implWrite() 304 CoderResult cr = encoder.flush(bb); in implClose() local 305 if (cr.isUnderflow()) in implClose() [all …]
|
D | StreamDecoder.java | 325 CoderResult cr = decoder.flush(cb); in implRead() local 326 if (cr.isOverflow()) { in implRead() 332 if (cr.isUnderflow()) { in implRead() 340 cr.throwException(); in implRead() 347 CoderResult cr = decoder.decode(bb, cb, eof); in implRead() local 348 if (cr.isUnderflow()) { in implRead() 368 if (cr.isOverflow()) { in implRead() 372 cr.throwException(); in implRead() 379 CoderResult cr = decoder.flush(cb); in implRead() local 380 if (cr.isOverflow()) { in implRead() [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/ |
D | ParseUtil.java | 214 CoderResult cr = dec.decode(bb, cb, true); in decode() local 215 if (cr.isError()) in decode() 217 cr = dec.flush(cb); in decode() 218 if (cr.isError()) in decode()
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixPath.java | 138 CoderResult cr = ce.encode(cb, bb, true); in encode() local 140 if (!cr.isUnderflow()) { in encode() 143 cr = ce.flush(bb); in encode() 144 error = !cr.isUnderflow(); in encode()
|
/libcore/ojluni/src/main/java/java/net/ |
D | URI.java | 2859 CoderResult cr = dec.decode(bb, cb, true); in decode() local 2860 assert cr.isUnderflow(); in decode() 2861 cr = dec.flush(cb); in decode() 2862 assert cr.isUnderflow(); in decode()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ScannerTest.java | 5552 CountReadable cr = new CountReadable(); in test_nextLine() local 5553 s = new Scanner(cr); in test_nextLine() 5557 assertEquals(1, cr.counter); in test_nextLine()
|