/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 | 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 | CharsetDecoderTest.java | 20 import java.nio.CharBuffer; 217 CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); in implTestDecodeByteBuffer() 239 CharBuffer out; in testDecodeByteBufferException() 249 CharBuffer buffer = decoder.decode(in); in testDecodeByteBufferException() 311 CharBuffer out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 365 out = CharBuffer.allocate(4); in implTestDecodeByteBufferCharBuffer() 372 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 376 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer() 411 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferUnmappedException() 465 CharBuffer out = CharBuffer.allocate(getString().length() * 3); in implTestDecodeCharBufferByteBufferMalformedException() [all …]
|
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 | CharsetEncoderTest.java | 19 import java.nio.CharBuffer; 276 encoder.encode(CharBuffer.wrap("aaa")); in testResetIllegalState() 278 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); in testResetIllegalState() 280 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); in testResetIllegalState() 285 CharBuffer in = CharBuffer.wrap("aaa"); in testFlushIllegalState() 331 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeFacadeIllegalState() 352 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), in testEncodeFacadeIllegalState() 359 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3"), in testEncodeFacadeIllegalState() 366 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState4"), in testEncodeFacadeIllegalState() 375 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeTrueIllegalState() [all …]
|
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()
|
/libcore/ojluni/annotations/flagged_api/java/nio/ |
D | CharBuffer.annotated.java | 34 public abstract class CharBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.C… class 36 CharBuffer(int mark, int pos, int lim, int cap) { throw new RuntimeException("Stub!"); } in CharBuffer() method in CharBuffer 38 public static java.nio.CharBuffer allocate(int capacity) { throw new RuntimeException("Stub!"); } in allocate() 40 public static java.nio.CharBuffer wrap(char[] array, int offset, int length) { throw new RuntimeExc… in wrap() 42 public static java.nio.CharBuffer wrap(char[] array) { throw new RuntimeException("Stub!"); } in wrap() 44 public int read(java.nio.CharBuffer target) throws java.io.IOException { throw new RuntimeException… in read() 46 public static java.nio.CharBuffer wrap(java.lang.CharSequence csq, int start, int end) { throw new … in wrap() 48 public static java.nio.CharBuffer wrap(java.lang.CharSequence csq) { throw new RuntimeException("St… in wrap() 50 public abstract java.nio.CharBuffer slice(); in slice() 52 public abstract java.nio.CharBuffer slice(int index, int length); in slice() [all …]
|
/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 | 272 public abstract class CharBuffer class 274 implements Comparable<CharBuffer>, Appendable, CharSequence, Readable 294 CharBuffer(int mark, int pos, int lim, int cap, // package-private in CharBuffer() method in CharBuffer 305 CharBuffer(int mark, int pos, int lim, int cap) { // package-private in CharBuffer() method in CharBuffer 376 public static CharBuffer allocate(int capacity) { in allocate() 421 public static CharBuffer wrap(char[] array, in wrap() 454 public static CharBuffer wrap(char[] array) { in wrap() 474 public int read(CharBuffer target) throws IOException { in read() 533 public static CharBuffer wrap(CharSequence csq, int start, int end) { in wrap() 555 public static CharBuffer wrap(CharSequence csq) { in wrap() [all …]
|
D | HeapCharBuffer.java | 47 extends CharBuffer 141 public CharBuffer slice() { in slice() 157 public CharBuffer slice(int index, int length) { in slice() 170 public CharBuffer duplicate() { in duplicate() 182 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 237 public CharBuffer get(char[] dst, int offset, int length) { in get() 249 public CharBuffer get(int index, char[] dst, int offset, int length) { in get() 270 public CharBuffer put(char x) { in put() 282 public CharBuffer put(int i, char x) { in put() 294 public CharBuffer put(char[] src, int offset, int length) { in put() [all …]
|
D | ByteBufferAsCharBuffer.java | 36 extends CharBuffer 93 public CharBuffer slice() { in slice() 104 public CharBuffer slice(int index, int length) { in slice() 116 public CharBuffer duplicate() { in duplicate() 127 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 177 public CharBuffer get(char[] dst, int off, int length) { in get() 187 public CharBuffer get(int index, char[] dst, int off, int length) { in get() 209 public CharBuffer put(char x) { in put() 225 public CharBuffer put(int i, char x) { in put() 242 public CharBuffer put(char[] src, int off, int length) { in put() [all …]
|
D | StringCharBuffer.java | 33 extends CharBuffer 47 public CharBuffer slice() { in slice() 60 public CharBuffer slice(int index, int length) { in slice() 83 public CharBuffer duplicate() { in duplicate() 88 public CharBuffer asReadOnlyBuffer() { in asReadOnlyBuffer() 106 public final CharBuffer put(char c) { in put() 110 public final CharBuffer put(int index, char c) { in put() 114 public final CharBuffer compact() { in compact() 126 public final CharBuffer subSequence(int start, int end) { in subSequence() 159 if (!(ob instanceof CharBuffer that)) in equals() [all …]
|
/libcore/ojluni/src/test/java/nio/Buffer/ |
D | BasicChar.java | 75 private static void relGet(CharBuffer b) { in relGet() 82 private static void relGet(CharBuffer b, int start) { in relGet() 89 private static void absGet(CharBuffer b) { in absGet() 96 private static void bulkGet(CharBuffer b) { in bulkGet() 105 private static void absBulkGet(CharBuffer b) { in absBulkGet() 117 private static void relPut(CharBuffer b) { in relPut() 125 private static void absPut(CharBuffer b) { in absPut() 134 private static void bulkPutArray(CharBuffer b) { in bulkPutArray() 144 private static void bulkPutBuffer(CharBuffer b) { in bulkPutBuffer() 147 CharBuffer c = CharBuffer.allocate(n + 7); in bulkPutBuffer() [all …]
|
D | Chars.java | 35 import java.nio.CharBuffer; 54 static CharBuffer randomizeRange(CharBuffer cb) { in randomizeRange() 66 static CharBuffer randomize(CharBuffer cb) { in randomize() 76 static int intSum(CharBuffer cb) { in intSum() 89 static void addCases(CharBuffer cb, List<CharBuffer> buffers) { in addCases() 104 List<CharBuffer> buffers = new ArrayList<>(); in createCharBuffers() 107 addCases(CharBuffer.allocate(SIZE), buffers); in createCharBuffers() 108 addCases(CharBuffer.wrap(new char[SIZE]), buffers); in createCharBuffers() 121 buffers.add(CharBuffer.wrap(randomize(CharBuffer.allocate(SIZE)))); in createCharBuffers() 125 CharBuffer cb = buffers.get(i); in createCharBuffers() [all …]
|
D | OrderChar.java | 37 private static void ckCharBuffer(CharBuffer buf, ByteOrder expected) { in ckCharBuffer() 49 CharBuffer buf = CharBuffer.wrap(array); in ckCharBuffer() 53 buf = CharBuffer.wrap(array, LENGTH/2, LENGTH/2); in ckCharBuffer() 57 buf = CharBuffer.allocate(LENGTH); in ckCharBuffer() 61 buf = CharBuffer.wrap("abcdefghijk"); in ckCharBuffer() 65 buf = CharBuffer.wrap("abcdefghijk", 0, 5); in ckCharBuffer() 69 buf = CharBuffer.wrap(array).subSequence(0, LENGTH); in ckCharBuffer()
|
D | StringCharBufferSliceTest.java | 30 import java.nio.CharBuffer; 51 CharBuffer buff = CharBuffer.wrap(in); in testSlice() 67 buff = CharBuffer.wrap(in, 3, in.length()); in testSlice() 76 BiConsumer<CharBuffer,CharBuffer> bitest = (b, s) -> { in testSlice() 111 Consumer<CharBuffer> test = (s) -> { in testSlice() 114 CharBuffer nextSlice = s.slice(); in testSlice() 161 CharBuffer dupe = s.duplicate(); in testSlice() 177 public static void helper(CharBuffer buff, CharBuffer slice) throws RuntimeException { in helper()
|
/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 …]
|
/libcore/ojluni/src/test/java/lang/CharSequence/ |
D | Emptiness.java | 27 import java.nio.CharBuffer; 53 checkEmpty(CharBuffer.wrap(new char[0])); in isEmpty() 54 checkEmpty(CharBuffer.wrap("")); in isEmpty() 61 checkEmpty((CharBuffer) ByteBuffer.allocate(2).asCharBuffer().flip()); in isEmpty() 66 checkEmpty((CharBuffer) ByteBuffer.allocateDirect(2).asCharBuffer().flip()); in isEmpty() 81 checkNotEmpty(CharBuffer.wrap(new char[] { 'f' })); in isNotEmpty() 82 checkNotEmpty(CharBuffer.wrap("foo")); in isNotEmpty() 89 checkNotEmpty((CharBuffer) ByteBuffer.allocate(2).asCharBuffer().append('f').flip()); in isNotEmpty() 94 checkNotEmpty((CharBuffer) ByteBuffer.allocateDirect(2).asCharBuffer().append('f').flip()); in isNotEmpty()
|
/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() 60 CharBuffer cb = CharBuffer.allocate(0); in testEmpty()
|
/libcore/ojluni/src/test/java/io/Reader/ |
D | NullReader.java | 28 import java.nio.CharBuffer; 87 CharBuffer charBuffer = CharBuffer.allocate(1); in testReadCharBuffer() 94 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferZeroRemaining() 127 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferClosed() 133 CharBuffer charBuffer = CharBuffer.allocate(0); in testReadCharBufferZeroRemainingClosed()
|