Home
last modified time | relevance | path

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

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DCoderResultTest.java21 import java.nio.charset.CoderResult;
50 assertNotSame(CoderResult.OVERFLOW, CoderResult.UNDERFLOW); in testConstants()
52 assertNotNull(CoderResult.OVERFLOW); in testConstants()
53 assertFalse(CoderResult.OVERFLOW.isError()); in testConstants()
54 assertFalse(CoderResult.OVERFLOW.isMalformed()); in testConstants()
55 assertFalse(CoderResult.OVERFLOW.isUnderflow()); in testConstants()
56 assertFalse(CoderResult.OVERFLOW.isUnmappable()); in testConstants()
57 assertTrue(CoderResult.OVERFLOW.isOverflow()); in testConstants()
58 assertTrue(CoderResult.OVERFLOW.toString().indexOf("OVERFLOW") != -1); in testConstants()
60 CoderResult.OVERFLOW.throwException(); in testConstants()
[all …]
DCharsetDecoderTest.java24 import java.nio.charset.CoderResult;
328 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); in implTestDecodeByteBufferCharBuffer()
341 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); in implTestDecodeByteBufferCharBuffer()
351 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); in implTestDecodeByteBufferCharBuffer()
353 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); in implTestDecodeByteBufferCharBuffer()
355 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); in implTestDecodeByteBufferCharBuffer()
367 assertSame(CoderResult.OVERFLOW, decoder.decode(in, out, false)); in implTestDecodeByteBufferCharBuffer()
371 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, false)); in implTestDecodeByteBufferCharBuffer()
375 assertSame(CoderResult.UNDERFLOW, decoder.decode(in, out, true)); in implTestDecodeByteBufferCharBuffer()
414 CoderResult result = decoder.decode(in, out, endOfInput); in implTestDecodeCharBufferByteBufferUnmappedException()
[all …]
DCharsetDecoder2Test.java28 import java.nio.charset.CoderResult;
61 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
159 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
173 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
192 CoderResult result = decoder.decode(in, out, false); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow()
219 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
223 return CoderResult.malformedForLength(1); in decodeLoop()
226 return CoderResult.OVERFLOW; in decodeLoop()
230 return CoderResult.UNDERFLOW; in decodeLoop()
DCharsetEncoderTest.java24 import java.nio.charset.CoderResult;
297 CoderResult result = encoder.flush(out); in testFlushIllegalState()
725 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); in testEncodeCharBufferByteBufferboolean()
740 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); in testEncodeCharBufferByteBufferboolean()
748 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); in testEncodeCharBufferByteBufferboolean()
750 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); in testEncodeCharBufferByteBufferboolean()
763 assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, true)); in testEncodeCharBufferByteBufferboolean()
772 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, true)); in testEncodeCharBufferByteBufferboolean()
782 assertSame(CoderResult.OVERFLOW, encoder.encode(in, out, false)); in testEncodeCharBufferByteBufferboolean()
791 assertSame(CoderResult.UNDERFLOW, encoder.encode(in, out, false)); in testEncodeCharBufferByteBufferboolean()
[all …]
DCharsetEncoder2Test.java27 import java.nio.charset.CoderResult;
84 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
96 protected CoderResult encodeLoop(CharBuffer arg0, ByteBuffer arg1) { in encodeLoop()
149 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
166 CoderResult result = encoder.encode(char1, bytes, false); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB()
DUTF16CharsetDecoderTest.java24 import java.nio.charset.CoderResult;
DISOCharsetEncoderTest.java22 import java.nio.charset.CoderResult;
DASCIICharsetEncoderTest.java25 import java.nio.charset.CoderResult;
86 assertEquals(CoderResult.UNDERFLOW, in testMultiStepEncode()
94 assertSame(CoderResult.UNDERFLOW, encoder.encode(buffer1, out, false)); in testMultiStepEncode()
DCharsetTest.java25 import java.nio.charset.CoderResult;
760 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) {
765 return CoderResult.UNDERFLOW;
774 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
778 return CoderResult.UNDERFLOW; in decodeLoop()
/libcore/ojluni/src/main/java/java/nio/charset/
DCoderResult.java85 public class CoderResult { class
99 private CoderResult(int type, int length) { in CoderResult() method in CoderResult
184 public static final CoderResult UNDERFLOW
185 = new CoderResult(CR_UNDERFLOW, 0);
191 public static final CoderResult OVERFLOW
192 = new CoderResult(CR_OVERFLOW, 0);
196 private Map<Integer,WeakReference<CoderResult>> cache = null;
198 protected abstract CoderResult create(int len); in create()
200 private synchronized CoderResult get(int len) { in get()
204 WeakReference<CoderResult> w; in get()
[all …]
DCharsetDecoder.java568 public final CoderResult decode(ByteBuffer in, CharBuffer out, in decode()
579 CoderResult cr; in decode()
593 cr = CoderResult.malformedForLength(in.remaining()); in decode()
613 return CoderResult.OVERFLOW; in decode()
668 public final CoderResult flush(CharBuffer out) { in flush()
670 CoderResult cr = implFlush(out); in flush()
679 return CoderResult.UNDERFLOW; // Already flushed in flush()
696 protected CoderResult implFlush(CharBuffer out) { in implFlush()
697 return CoderResult.UNDERFLOW; in implFlush()
759 protected abstract CoderResult decodeLoop(ByteBuffer in, in decodeLoop()
[all …]
DCharsetEncoder.java372 CoderResult cr = dec.decode(bb, cb, true); in isLegalReplacement()
585 public final CoderResult encode(CharBuffer in, ByteBuffer out, in encode()
596 CoderResult cr; in encode()
610 cr = CoderResult.malformedForLength(in.remaining()); in encode()
630 return CoderResult.OVERFLOW; in encode()
685 public final CoderResult flush(ByteBuffer out) { in flush()
687 CoderResult cr = implFlush(out); in flush()
696 return CoderResult.UNDERFLOW; // Already flushed in flush()
713 protected CoderResult implFlush(ByteBuffer out) { in implFlush()
714 return CoderResult.UNDERFLOW; in implFlush()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetEncoderTest.java24 import java.nio.charset.CoderResult;
72 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842', '\udf9f' }), bb, false); in testSurrogatePairAllAtOnce()
73 assertEquals(CoderResult.UNDERFLOW, cr); 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()
124 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates()
127 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates()
136 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates()
139 assertEquals(CoderResult.UNDERFLOW, cr); in testCharsetEncoderSplitSurrogates()
147 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { 'x' }), bb, false); in testFlushWithoutEndOfInput()
[all …]
DCharsetDecoderTest.java25 import java.nio.charset.CoderResult;
46 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true); in test_ByteArray_decode_no_offset()
62 CoderResult coderResult = decoder.decode(inBuffer, outBuffer, true); in test_ByteArray_decode_with_offset()
98 CoderResult cr; in testUtf8BytesSplitAcrossMultipleWrites()
100 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites()
102 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites()
104 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites()
106 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites()
108 assertEquals(CoderResult.UNDERFLOW, cr); in testUtf8BytesSplitAcrossMultipleWrites()
118 CoderResult cr = decoder.decode( in testBufferWithNonZeroOffset()
/libcore/luni/src/main/java/java/nio/charset/
DCharsetDecoderICU.java107 @Override protected final CoderResult implFlush(CharBuffer out) { in implFlush()
120 return CoderResult.OVERFLOW; in implFlush()
123 return CoderResult.malformedForLength(data[INVALID_BYTE_COUNT]); in implFlush()
127 return CoderResult.UNDERFLOW; in implFlush()
134 @Override protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
136 return CoderResult.UNDERFLOW; in decodeLoop()
146 return CoderResult.OVERFLOW; in decodeLoop()
148 return CoderResult.unmappableForLength(data[INVALID_BYTE_COUNT]); in decodeLoop()
150 return CoderResult.malformedForLength(data[INVALID_BYTE_COUNT]); in decodeLoop()
156 return CoderResult.UNDERFLOW; in decodeLoop()
DCharsetEncoderICU.java135 @Override protected CoderResult implFlush(ByteBuffer out) { in implFlush()
148 return CoderResult.OVERFLOW; in implFlush()
151 return CoderResult.malformedForLength(data[INVALID_CHAR_COUNT]); in implFlush()
155 return CoderResult.UNDERFLOW; in implFlush()
162 @Override protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
164 return CoderResult.UNDERFLOW; in encodeLoop()
175 return CoderResult.OVERFLOW; in encodeLoop()
177 return CoderResult.unmappableForLength(data[INVALID_CHAR_COUNT]); in encodeLoop()
179 return CoderResult.malformedForLength(data[INVALID_CHAR_COUNT]); in encodeLoop()
185 return CoderResult.UNDERFLOW; in encodeLoop()
/libcore/ojluni/annotations/hiddenapi/java/nio/charset/
DCharsetEncoder.java112 public final java.nio.charset.CoderResult encode( in encode()
117 public final java.nio.charset.CoderResult flush(java.nio.ByteBuffer out) { in flush()
121 protected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer out) { in implFlush()
133 protected abstract java.nio.charset.CoderResult encodeLoop( in encodeLoop()
/libcore/ojluni/src/main/java/java/util/zip/
DZipCoder.java34 import java.nio.charset.CoderResult;
63 CoderResult cr = cd.decode(bb, cb, true); in toString()
93 CoderResult cr = ce.encode(cb, bb, true); in getBytes()
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamEncoder.java242 CoderResult cr = encoder.encode(lcb, bb, endOfInput); in flushLeftoverChar()
271 CoderResult cr = encoder.encode(cb, bb, false); in implWrite()
304 CoderResult cr = encoder.flush(bb); in implClose()
DStreamDecoder.java325 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()
/libcore/luni/src/test/java/libcore/java/lang/
DStringTest.java30 import java.nio.charset.CoderResult;
52 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
59 return CoderResult.UNDERFLOW; in decodeLoop()
74 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
80 return CoderResult.UNDERFLOW; in encodeLoop()
/libcore/ojluni/src/main/java/sun/net/www/
DParseUtil.java40 import java.nio.charset.CoderResult;
214 CoderResult cr = dec.decode(bb, cb, true); in decode()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixPath.java138 CoderResult cr = ce.encode(cb, bb, true); in encode()
/libcore/ojluni/src/main/java/java/net/
DURI.java37 import java.nio.charset.CoderResult;
2858 CoderResult cr = dec.decode(bb, cb, true); in decode()
/libcore/
Dopenjdk_java_files.bp435 "ojluni/src/main/java/java/nio/charset/CoderResult.java",