/external/apache-harmony/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/ |
ASCIICharsetEncoderTest.java | 20 import java.nio.CharBuffer; 80 encoder.encode(CharBuffer.wrap("\ud800\udc00")); 86 assertTrue(encoder.encode(CharBuffer.wrap("\ud800"), out, true) 91 assertSame(CoderResult.UNDERFLOW, encoder.encode(CharBuffer 93 assertTrue(encoder.encode(CharBuffer.wrap("\udc00"), out, true) 102 CharBuffer cb = CharBuffer.wrap(chars); 107 CharBuffer cb = CharBuffer.wrap("\u0080"); 114 cb = CharBuffer.wrap("\ud800") [all...] |
CharsetEncoderTest.java | 22 import java.nio.CharBuffer; 84 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { 96 protected CoderResult encodeLoop(CharBuffer arg0, ByteBuffer arg1) { 106 * Test malfunction encode(CharBuffer) 111 cs.encode(CharBuffer.wrap("AB")); 149 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { 155 * Test reserve bytes encode(CharBuffer,ByteBuffer,boolean) 159 CharBuffer in1 = CharBuffer.wrap("\ud800"); 160 CharBuffer in2 = CharBuffer.wrap("\udc00") [all...] |
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/ |
WrappedCharBufferTest1.java | 19 import java.nio.CharBuffer; 25 buf = CharBuffer.wrap(new char[BUFFER_LENGTH]); 37 * @tests java.nio.CharBuffer#allocate(char[],int,int) 43 CharBuffer.wrap(array, -1, 0); 49 CharBuffer.wrap(array, BUFFER_LENGTH + 1, 0); 55 CharBuffer.wrap(array, 0, -1); 61 CharBuffer.wrap(array, 0, BUFFER_LENGTH + 1); 67 CharBuffer.wrap(array, Integer.MAX_VALUE, 1); 73 CharBuffer.wrap(array, 1, Integer.MAX_VALUE); 79 CharBuffer.wrap((char[])null, -1, 0) [all...] |
CharBufferTest.java | 24 import java.nio.CharBuffer; 29 * Tests java.nio.CharBuffer 37 protected CharBuffer buf; 44 buf = CharBuffer.wrap(charscopy); 93 CharBuffer readonly = buf.asReadOnlyBuffer(); 142 CharBuffer ret = buf.compact(); 194 CharBuffer other = CharBuffer.allocate(buf.capacity()); 221 CharBuffer duplicate = buf.duplicate(); 279 CharBuffer readonly = buf.asReadOnlyBuffer() [all...] |
WrappedCharBufferTest2.java | 20 import java.nio.CharBuffer; 28 buf = CharBuffer.wrap(TEST_STRING); 41 CharBuffer.wrap(str, -1, 0); 47 CharBuffer.wrap(str, 21, 21); 53 CharBuffer.wrap(str, 2, 1); 59 CharBuffer.wrap(str, 0, 21); 65 CharBuffer.wrap((String)null, -1, 21); 109 CharBuffer other = CharBuffer.allocate(1); 117 buf.put((CharBuffer) null) [all...] |
HeapCharBufferTest.java | 19 import java.nio.CharBuffer; 25 buf = CharBuffer.allocate(BUFFER_LENGTH); 38 CharBuffer.allocate(-1);
|
/external/apache-harmony/nio_char/src/test/java/tests/api/java/nio/charset/ |
ISOCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 76 CharBuffer getMalformedCharBuffer() { 77 return CharBuffer.wrap("\ud800 buffer"); 80 CharBuffer getUnmapCharBuffer() { 81 return CharBuffer.wrap("\ud800\udc00 buffer"); 84 CharBuffer getExceptionCharBuffer() { 96 encoder.encode(CharBuffer.wrap("\ud800\udc00")); 102 assertTrue(encoder.encode(CharBuffer.wrap("\ud800"), out, true) 107 assertSame(CoderResult.UNDERFLOW, encoder.encode(CharBuffer 109 assertTrue(encoder.encode(CharBuffer.wrap("\udc00"), out, true [all...] |
GBCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 79 CharBuffer getMalformedCharBuffer() { 80 return CharBuffer.wrap("\ud800 buffer"); 83 CharBuffer getUnmapCharBuffer() { 87 CharBuffer getExceptionCharBuffer() {
|
UTF16LECharsetEncoderTest.java | 19 import java.nio.CharBuffer; 98 CharBuffer getMalformedCharBuffer() { 99 return CharBuffer.wrap("\ud800 buffer"); 102 CharBuffer getUnmapCharBuffer() { 106 CharBuffer getExceptionCharBuffer() {
|
UTFCharsetEncoderTest.java | 19 import java.nio.CharBuffer; 85 CharBuffer getMalformedCharBuffer() { 86 return CharBuffer.wrap("\ud800 buffer"); 89 CharBuffer getUnmapCharBuffer() { 93 CharBuffer getExceptionCharBuffer() {
|
CharsetDecoderTest.java | 20 import java.nio.CharBuffer; 199 * Class under test for CharBuffer decode(ByteBuffer) 214 CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); 236 CharBuffer out; 246 CharBuffer buffer = decoder.decode(in); 298 * Class under test for CoderResult decode(ByteBuffer, CharBuffer, boolean) 309 CharBuffer out = CharBuffer.allocate(100); 363 out = CharBuffer.allocate(4); 370 out = CharBuffer.allocate(100) [all...] |
CharsetEncoderTest.java | 19 import java.nio.CharBuffer; 276 encoder.encode(CharBuffer.wrap("aaa")); 278 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); 280 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); 285 CharBuffer in = CharBuffer.wrap("aaa"); 329 CharBuffer in = CharBuffer.wrap("aaa"); 350 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState2"), 357 encoder.encode(CharBuffer.wrap("testCanEncodeIllegalState3") [all...] |
/libcore/luni/src/main/java/java/nio/ |
ReadOnlyCharArrayBuffer.java | 48 public CharBuffer asReadOnlyBuffer() { 53 public CharBuffer compact() { 58 public CharBuffer duplicate() { 83 public CharBuffer put(char c) { 88 public CharBuffer put(int index, char c) { 93 public final CharBuffer put(char[] src, int srcOffset, int charCount) { 98 public final CharBuffer put(CharBuffer src) { 103 public CharBuffer put(String src, int start, int end) { 108 public CharBuffer slice() [all...] |
ReadWriteCharArrayBuffer.java | 55 public CharBuffer asReadOnlyBuffer() { 60 public CharBuffer compact() { 69 public CharBuffer duplicate() { 94 public CharBuffer put(char c) { 103 public CharBuffer put(int index, char c) { 110 public CharBuffer put(char[] src, int srcOffset, int charCount) { 120 public CharBuffer slice() {
|
CharSequenceAdapter.java | 32 final class CharSequenceAdapter extends CharBuffer { 50 public CharBuffer asReadOnlyBuffer() { 55 public CharBuffer compact() { 60 public CharBuffer duplicate() { 79 public final CharBuffer get(char[] dst, int dstOffset, int charCount) { 121 public CharBuffer put(char c) { 126 public CharBuffer put(int index, char c) { 131 public final CharBuffer put(char[] src, int srcOffset, int charCount) { 136 public CharBuffer put(String src, int start, int end) { 141 public CharBuffer slice() [all...] |
CharToByteBufferAdapter.java | 34 final class CharToByteBufferAdapter extends CharBuffer { 38 static CharBuffer asCharBuffer(ByteBuffer byteBuffer) { 52 public CharBuffer asReadOnlyBuffer() { 62 public CharBuffer compact() { 77 public CharBuffer duplicate() { 101 public CharBuffer get(char[] dst, int dstOffset, int charCount) { 144 public CharBuffer put(char c) { 153 public CharBuffer put(int index, char c) { 160 public CharBuffer put(char[] src, int srcOffset, int charCount) { 173 public CharBuffer slice() [all...] |
/libcore/luni/src/main/java/java/lang/ |
Readable.java | 20 import java.nio.CharBuffer; 24 * into a {@link CharBuffer}. 29 * Reads characters into the specified {@code CharBuffer}. The maximum 30 * number of characters read is {@code CharBuffer.remaining()}. 39 int read(CharBuffer cb) throws IOException;
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ |
ReaderTest.java | 21 import java.nio.CharBuffer; 30 CharBuffer charBuffer = null; 32 mockReader.read(charBuffer); 40 //the charBuffer has the capacity of 0, then there the number of char read 41 // to the CharBuffer is 0. Furthermore, the MockReader is intact in its content. 45 CharBuffer charBuffer = CharBuffer.allocate(0); 46 int result = mockReader.read(charBuffer); [all...] |
/libcore/luni/src/test/java/libcore/java/nio/charset/ |
OldCharsetEncoderDecoderBufferTest.java | 20 import java.nio.CharBuffer; 41 CharBuffer out = CharBuffer.wrap(cBuf); 71 CharBuffer out = CharBuffer.wrap(new char[10]); 102 encoder.encode(CharBuffer.wrap("ab"), out, false); 114 encoder.encode(CharBuffer.wrap("x"), out, true); 132 CharBuffer inWithArray = CharBuffer.wrap(inArray); 139 CharBuffer inWithoutArray = CharBuffer.wrap("x") [all...] |
CharsetEncoderTest.java | 20 import java.nio.CharBuffer; 36 String output = ascii.decode(e.encode(CharBuffer.wrap(input))).toString(); 70 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842', '\udf9f' }), bb, false); 84 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); 116 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842' }), bb, false); 119 cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); 137 cr = e.encode(CharBuffer.wrap(new char[] { }), bb, true); 165 CoderResult cr = e.encode(CharBuffer.wrap(new char[] { '\ud842' }), bb, false); 168 cr = e.encode(CharBuffer.wrap(new char[] { '\udf9f' }), bb, false); 177 cr = e.encode(CharBuffer.wrap(new char[] { }), bb, true) [all...] |
CharsetDecoderTest.java | 20 import java.nio.CharBuffer; 44 CharBuffer outBuffer = CharBuffer.allocate(arr.length); 60 CharBuffer outBuffer = CharBuffer.allocate(arr.length - offset); 75 CharBuffer outBuffer = decoder.decode(ByteBuffer.wrap(arr, offset, arr.length - offset)); 88 return encoder.encode(CharBuffer.wrap(s)).array(); 93 CharBuffer cb = CharBuffer.allocate(128);
|
OldCharset_AbstractTest.java | 20 import java.nio.CharBuffer; 109 CharBuffer inputCB = CharBuffer.wrap(testChars); 125 CharBuffer outputCB; 156 CharBuffer inputCB = CharBuffer.wrap(testChars); 174 CharBuffer inputCB = CharBuffer.allocate(1); 181 CharBuffer outputCB = decoder.decode(intermediateBB); 199 CharBuffer inputCB = CharBuffer.allocate(65536) [all...] |
/external/icu4c/samples/layout/ |
UnicodeReader.cpp | 31 UChar *charBuffer; 107 charBuffer = LE_NEW_ARRAY(UChar, charCount + 1); 108 if(charBuffer == 0) { 114 myText.extract(0, myText.length(), charBuffer); 115 charBuffer[charCount] = 0; // NULL terminate for easier reading in the debugger 117 return charBuffer;
|
/libcore/luni/src/main/java/java/nio/charset/ |
CharsetDecoder.java | 22 import java.nio.CharBuffer; 30 * {@link java.nio.CharBuffer CharBuffer}. A decoder instance should be used in 35 * <li>invoking the {@link #decode(ByteBuffer, CharBuffer, boolean) decode} 39 * <li>invoking the {@link #decode(ByteBuffer, CharBuffer, boolean) decode} 42 * <li>invoking the {@link #flush(CharBuffer) flush} method to flush the 46 * The {@link #decode(ByteBuffer, CharBuffer, boolean) decode} method will 74 * {@link #decodeLoop(ByteBuffer, CharBuffer) decodeLoop} method for the basic 76 * {@link #implFlush(CharBuffer) implFlush} method and the 163 * @return a new <code>CharBuffer</code> containing the the character [all...] |
CharsetEncoder.java | 22 import java.nio.CharBuffer; 28 * <p>The input character sequence is a {@link java.nio.CharBuffer CharBuffer} and the 31 * <p>Use {@link #encode(CharBuffer)} to encode an entire {@code CharBuffer} to a 32 * new {@code ByteBuffer}, or {@link #encode(CharBuffer, ByteBuffer, boolean)} for more 36 * <li>Invoke {@link #encode(CharBuffer, ByteBuffer, boolean) encode} with the {@code endOfInput} 39 * <p>The {@link #encode(CharBuffer, ByteBuffer, boolean) encode} method will 46 * <li>Invoke {@link #encode(CharBuffer, ByteBuffer, boolean) encode} for the last time with 69 * {@link #encodeLoop(CharBuffer, ByteBuffer) encodeLoop} method for basi [all...] |