/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCIICharsetEncoderTest.java | 21 import java.nio.CharBuffer; 80 encoder.encode(CharBuffer.wrap("\ud800\udc00")); in testMultiStepEncode() 87 encoder.encode(CharBuffer.wrap("\ud800"), out, true)); in testMultiStepEncode() 92 CharBuffer buffer1 = CharBuffer.wrap("\ud800"); in testMultiStepEncode() 93 CharBuffer buffer2 = CharBuffer.wrap("\udc00"); in testMultiStepEncode() 108 CharBuffer cb = CharBuffer.wrap(chars); in testEncodeMapping() 113 CharBuffer cb = CharBuffer.wrap("\u0080"); in testEncodeMapping() 120 cb = CharBuffer.wrap("\ud800"); in testEncodeMapping() 128 cb = CharBuffer.wrap("A"); in testEncodeMapping() 139 CharBuffer in = CharBuffer.wrap("A"); in testInternalState() [all …]
|
D | CharsetDecoderTest.java | 20 import java.nio.CharBuffer; 214 CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); in implTestDecodeByteBuffer() 236 CharBuffer out; in testDecodeByteBufferException() 246 CharBuffer buffer = decoder.decode(in); in testDecodeByteBufferException() 309 CharBuffer out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 363 out = CharBuffer.allocate(4); in implTestDecodeByteBufferCharBuffer() 370 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 374 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 409 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferUnmappedException() 463 CharBuffer out = CharBuffer.allocate(getString().length() * 3); in implTestDecodeCharBufferByteBufferMalformedException() [all …]
|
D | ISOCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 67 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 68 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 71 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 72 return CharBuffer.wrap("\ud800\udc00 buffer"); in getUnmapCharBuffer() 75 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer() 87 encoder.encode(CharBuffer.wrap("\ud800\udc00")); in testMultiStepEncode()
|
D | CharsetEncoder2Test.java | 22 import java.nio.CharBuffer; 84 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop() 96 protected CoderResult encodeLoop(CharBuffer arg0, ByteBuffer arg1) { in encodeLoop() 111 cs.encode(CharBuffer.wrap("AB")); in test_EncodeLjava_nio_CharBuffer() 149 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop() 160 CharBuffer char1 = CharBuffer.wrap("\ud800"); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() 161 CharBuffer char2 = CharBuffer.wrap("\udc00"); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() 187 CharBuffer chars = utf8.newDecoder().decode(bytes); in test_EncodeLjava_nio_CharBufferLjava_nio_ByteBufferB() 203 Charset.forName("UTF-8").encode(CharBuffer.wrap(s)); in testUtf8Encoding()
|
D | GBCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 73 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 74 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 77 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 81 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer()
|
D | UTFCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 78 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 79 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 82 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 86 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer()
|
D | UTF16LECharsetEncoderTest.java | 19 import java.nio.CharBuffer; 89 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 90 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 93 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 97 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer()
|
D | UTF16BECharsetEncoderTest.java | 19 import java.nio.CharBuffer; 89 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 90 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 93 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 97 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer()
|
D | CharsetEncoderTest.java | 19 import java.nio.CharBuffer; 273 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() 282 CharBuffer in = CharBuffer.wrap("aaa"); in testFlushIllegalState() 328 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeFacadeIllegalState() 349 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), in testEncodeFacadeIllegalState() 356 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), in testEncodeFacadeIllegalState() 363 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), in testEncodeFacadeIllegalState() 372 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeTrueIllegalState() [all …]
|
D | CharsetDecoder2Test.java | 22 import java.nio.CharBuffer; 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() 188 CharBuffer out = CharBuffer.allocate(1); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 196 out = CharBuffer.allocate(10); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow() 219 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop() 259 CharBuffer cb = decoder.decode(ByteBuffer.wrap(bytes)); in testInvalidDecoding() 272 CharBuffer cb = decoder.decode(bb); in testInvalidDecoding()
|
D | UTF16CharsetEncoderTest.java | 20 import java.nio.CharBuffer; 94 CharBuffer getMalformedCharBuffer() { in getMalformedCharBuffer() 95 return CharBuffer.wrap("\ud800 buffer"); in getMalformedCharBuffer() 98 CharBuffer getUnmapCharBuffer() { in getUnmapCharBuffer() 102 CharBuffer getExceptionCharBuffer() { in getExceptionCharBuffer()
|
/libcore/ojluni/annotations/hiddenapi/java/nio/ |
D | CharBuffer.java | 34 public abstract class CharBuffer extends java.nio.Buffer class 35 implements java.lang.Comparable<java.nio.CharBuffer>, 40 CharBuffer(int mark, int pos, int lim, int cap, char[] hb, int offset) { in CharBuffer() method in CharBuffer 45 CharBuffer(int mark, int pos, int lim, int cap) { in CharBuffer() method in CharBuffer 50 public static java.nio.CharBuffer allocate(int capacity) { in allocate() 54 public static java.nio.CharBuffer wrap(char[] array, int offset, int length) { in wrap() 58 public static java.nio.CharBuffer wrap(char[] array) { in wrap() 62 public int read(java.nio.CharBuffer target) throws java.io.IOException { in read() 66 public static java.nio.CharBuffer wrap(java.lang.CharSequence csq, int start, int end) { in wrap() 70 public static java.nio.CharBuffer wrap(java.lang.CharSequence csq) { in wrap() [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | CharBuffer.java | 121 public abstract class CharBuffer class 123 implements Comparable<CharBuffer>, Appendable, CharSequence, Readable 137 CharBuffer(int mark, int pos, int lim, int cap, // package-private in CharBuffer() method in CharBuffer 148 CharBuffer(int mark, int pos, int lim, int cap) { // package-private in CharBuffer() method in CharBuffer 169 public static CharBuffer allocate(int capacity) { in allocate() 206 public static CharBuffer wrap(char[] array, in wrap() 232 public static CharBuffer wrap(char[] array) { in wrap() 251 public int read(CharBuffer target) throws IOException { in read() 300 public static CharBuffer wrap(CharSequence csq, int start, int end) { in wrap() 322 public static CharBuffer wrap(CharSequence csq) { in wrap() [all …]
|
D | ByteBufferAsCharBuffer.java | 30 class ByteBufferAsCharBuffer extends CharBuffer { // package-private 57 public CharBuffer slice() { in slice() 67 public CharBuffer duplicate() { in duplicate() 77 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 99 public CharBuffer get(char[] dst, int offset, int length) { in get() 112 public CharBuffer put(char x) { in put() 117 public CharBuffer put(int i, char x) { in put() 125 public CharBuffer put(char[] src, int offset, int length) { in put() 134 public CharBuffer compact() { in compact() 167 CharBuffer cb = CharBuffer.wrap(ca); in toString() [all …]
|
D | StringCharBuffer.java | 32 extends CharBuffer 44 public CharBuffer slice() { in slice() 63 public CharBuffer duplicate() { in duplicate() 68 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 86 public final CharBuffer put(char c) { in put() 90 public final CharBuffer put(int index, char c) { in put() 94 public final CharBuffer compact() { in compact() 106 public final CharBuffer subSequence(int start, int end) { in subSequence()
|
D | HeapCharBuffer.java | 33 class HeapCharBuffer extends CharBuffer { 75 public CharBuffer slice() { in slice() 85 public CharBuffer duplicate() { in duplicate() 95 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 122 public CharBuffer get(char[] dst, int offset, int length) { in get() 139 public CharBuffer put(char x) { in put() 147 public CharBuffer put(int i, char x) { in put() 155 public CharBuffer put(char[] src, int offset, int length) { in put() 167 public CharBuffer put(CharBuffer src) { in put() 195 public CharBuffer compact() { in compact() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | WrappedCharBufferTest1.java | 19 import java.nio.CharBuffer; 25 buf = CharBuffer.wrap(new char[BUFFER_LENGTH]); in setUp() 43 CharBuffer.wrap(array, -1, 0); in testWrappedCharBuffer_IllegalArg() 49 CharBuffer.wrap(array, BUFFER_LENGTH + 1, 0); in testWrappedCharBuffer_IllegalArg() 55 CharBuffer.wrap(array, 0, -1); in testWrappedCharBuffer_IllegalArg() 61 CharBuffer.wrap(array, 0, BUFFER_LENGTH + 1); in testWrappedCharBuffer_IllegalArg() 67 CharBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedCharBuffer_IllegalArg() 73 CharBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedCharBuffer_IllegalArg() 79 CharBuffer.wrap((char[])null, -1, 0); in testWrappedCharBuffer_IllegalArg()
|
D | WrappedCharBufferTest2.java | 20 import java.nio.CharBuffer; 28 buf = CharBuffer.wrap(TEST_STRING); in setUp() 41 CharBuffer.wrap(str, -1, 0); in testWrappedCharSequence_IllegalArg() 47 CharBuffer.wrap(str, 21, 21); in testWrappedCharSequence_IllegalArg() 53 CharBuffer.wrap(str, 2, 1); in testWrappedCharSequence_IllegalArg() 59 CharBuffer.wrap(str, 0, 21); in testWrappedCharSequence_IllegalArg() 65 CharBuffer.wrap((String)null, -1, 21); in testWrappedCharSequence_IllegalArg() 109 CharBuffer other = CharBuffer.allocate(1); in testPutCharBuffer() 116 buf.put((CharBuffer) null); in testPutCharBuffer()
|
D | CharBufferTest.java | 24 import java.nio.CharBuffer; 37 protected CharBuffer buf; 44 buf = CharBuffer.wrap(charscopy); in setUp() 93 CharBuffer readonly = buf.asReadOnlyBuffer(); in testAsReadOnlyBuffer() 142 CharBuffer ret = buf.compact(); in testCompact() 194 CharBuffer other = CharBuffer.allocate(buf.capacity()); in testCompareTo() 221 CharBuffer duplicate = buf.duplicate(); 279 CharBuffer readonly = buf.asReadOnlyBuffer(); 281 CharBuffer duplicate = buf.duplicate(); 323 CharBuffer ret = buf.get(array); in testGetcharArray() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
D | OldCharsetEncoderDecoderBufferTest.java | 20 import java.nio.CharBuffer; 41 CharBuffer out = CharBuffer.wrap(cBuf); in testDecoderOutputBuffer() 71 CharBuffer out = CharBuffer.wrap(new char[10]); in testDecoderInputBuffer() 102 encoder.encode(CharBuffer.wrap("ab"), out, false); in testEncoderOutputBuffer() 114 encoder.encode(CharBuffer.wrap("x"), out, true); in testEncoderOutputBuffer() 132 CharBuffer inWithArray = CharBuffer.wrap(inArray); in testEncoderInputBuffer() 139 CharBuffer inWithoutArray = CharBuffer.wrap("x"); in testEncoderInputBuffer()
|
D | CharsetDecoderTest.java | 20 import java.nio.CharBuffer; 44 CharBuffer outBuffer = CharBuffer.allocate(arr.length); in test_ByteArray_decode_no_offset() 60 CharBuffer outBuffer = CharBuffer.allocate(arr.length - offset); in test_ByteArray_decode_with_offset() 75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset)); in test_ByteArray_decode_with_offset_using_facade_method() 88 ByteBuffer buf = encoder.encode(CharBuffer.wrap(s)); in encode() 97 CharBuffer cb = CharBuffer.allocate(128); in testUtf8BytesSplitAcrossMultipleWrites() 115 CharBuffer cb = CharBuffer.allocate(128); in testBufferWithNonZeroOffset() 117 CharBuffer out = cb.slice(); in testBufferWithNonZeroOffset()
|
D | OldCharset_AbstractTest.java | 20 import java.nio.CharBuffer; 114 CharBuffer inputCB = CharBuffer.wrap(testChars); in test_dumpEncoded() 131 CharBuffer outputCB = decoder.decode(inputBB); in decode() 141 CharBuffer inputCB = CharBuffer.wrap(testChars); in test_Encode() 159 CharBuffer inputCB = CharBuffer.allocate(1); in NNtest_CodecDynamicIndividuals() 166 CharBuffer outputCB = decoder.decode(intermediateBB); in NNtest_CodecDynamicIndividuals() 182 CharBuffer inputCB = CharBuffer.allocate(65536); in test_CodecDynamic() 208 CharBuffer outputCB = decoder.decode(intermediateBB); in test_CodecDynamic() 216 boolean encodesToNothing = encoder.encode(CharBuffer.wrap(codeChars)).limit() == 0; in encodesToNothing() 225 static void assertEqualCBs (String msg, CharBuffer expectedCB, CharBuffer actualCB) { in assertEqualCBs() [all …]
|
D | CharsetEncoderTest.java | 20 import java.nio.CharBuffer; 38 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() 181 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in newEncoder() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | CharBufferTest.java | 22 import java.nio.CharBuffer; 30 CharBuffer cb = CharBuffer.allocate(32).append(s); in testChars() 41 CharBuffer cb = CharBuffer.allocate(32).append(s); in testCodePoints() 51 cb = CharBuffer.allocate(32).append(surrogateCP); in testCodePoints()
|
/libcore/ojluni/src/main/java/java/nio/charset/ |
D | CharsetEncoder.java | 33 import java.nio.CharBuffer; 371 CharBuffer cb = CharBuffer.allocate((int)(bb.remaining() in isLegalReplacement() 586 public final CoderResult encode(CharBuffer in, ByteBuffer out, in encode() 777 protected abstract CoderResult encodeLoop(CharBuffer in, in encodeLoop() 811 public final ByteBuffer encode(CharBuffer in) in encode() 920 private boolean canEncode(CharBuffer cb) { in canEncode() 976 CharBuffer cb = CharBuffer.allocate(1); in canEncode() 1008 CharBuffer cb; in canEncode() 1009 if (cs instanceof CharBuffer) in canEncode() 1010 cb = ((CharBuffer)cs).duplicate(); in canEncode() [all …]
|