/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/ |
D | Adler32Test.java | 162 private void assertChecksumFromByteBuffer(long expectedChecksum, ByteBuffer byteBuffer) { in assertChecksumFromByteBuffer() argument 164 checksum.update(byteBuffer); in assertChecksumFromByteBuffer() 167 assertEquals(0, byteBuffer.remaining()); in assertChecksumFromByteBuffer() 176 ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[] {1,2,3,4}); in test_update$ByteBuffer() local 177 byteBuffer.position(2); in test_update$ByteBuffer() 178 assertChecksumFromByteBuffer(0xc0008, byteBuffer); in test_update$ByteBuffer() 181 byteBuffer.flip(); in test_update$ByteBuffer() 182 byteBuffer = ByteBuffer.allocateDirect(4).put(byteBuffer); in test_update$ByteBuffer() 183 byteBuffer.flip(); in test_update$ByteBuffer() 184 byteBuffer.position(2); in test_update$ByteBuffer() [all …]
|
D | CRC32Test.java | 179 private void assertChecksumFromByteBuffer(long expectedChecksum, ByteBuffer byteBuffer) { in assertChecksumFromByteBuffer() argument 181 checksum.update(byteBuffer); in assertChecksumFromByteBuffer() 184 assertEquals(0, byteBuffer.remaining()); in assertChecksumFromByteBuffer() 193 ByteBuffer byteBuffer = ByteBuffer.wrap(new byte[] {1,2,3,4}); in test_update$ByteBuffer() local 194 byteBuffer.position(2); in test_update$ByteBuffer() 195 assertChecksumFromByteBuffer(0x6d998525, byteBuffer); in test_update$ByteBuffer() 198 byteBuffer.flip(); in test_update$ByteBuffer() 199 byteBuffer = ByteBuffer.allocateDirect(4).put(byteBuffer); in test_update$ByteBuffer() 200 byteBuffer.flip(); in test_update$ByteBuffer() 201 byteBuffer.position(2); in test_update$ByteBuffer() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/ |
D | OldDirectIntBufferTest.java | 29 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(40); in testPutWhenOffsetIsNonZero() local 30 byteBuffer.order(ByteOrder.nativeOrder()); in testPutWhenOffsetIsNonZero() 31 IntBuffer intBuffer = byteBuffer.asIntBuffer(); in testPutWhenOffsetIsNonZero()
|
D | OldDirectShortBufferTest.java | 29 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(40); in testPutWhenOffsetIsNonZero() local 30 byteBuffer.order(ByteOrder.nativeOrder()); in testPutWhenOffsetIsNonZero() 31 ShortBuffer shortBuffer = byteBuffer.asShortBuffer(); in testPutWhenOffsetIsNonZero()
|
D | BufferTest.java | 1316 ByteBuffer byteBuffer = ByteBuffer.allocate(10); in test_ByteBufferAsXBuffer_ByteOrder() local 1319 byteBuffer.put((byte)i); in test_ByteBufferAsXBuffer_ByteOrder() 1321 byteBuffer.rewind(); in test_ByteBufferAsXBuffer_ByteOrder() 1323 ByteBuffer bigEndian = byteBuffer.duplicate().order(ByteOrder.BIG_ENDIAN); in test_ByteBufferAsXBuffer_ByteOrder() 1324 ByteBuffer littleEndian = byteBuffer.duplicate().order(ByteOrder.LITTLE_ENDIAN); in test_ByteBufferAsXBuffer_ByteOrder() 1380 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(10); in test_ByteBufferAsXBuffer_ByteOrder_2() local 1381 byteBuffer.order(ByteOrder.BIG_ENDIAN); in test_ByteBufferAsXBuffer_ByteOrder_2() 1384 byteBuffer.put((byte)i); in test_ByteBufferAsXBuffer_ByteOrder_2() 1386 byteBuffer.rewind(); in test_ByteBufferAsXBuffer_ByteOrder_2() 1389 ShortBuffer sb_be = byteBuffer.asShortBuffer(); in test_ByteBufferAsXBuffer_ByteOrder_2() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | MessageDigest1Test.java | 114 ByteBuffer byteBuffer = ByteBuffer.wrap(b); in test_updateLjava_nio_ByteBuffer() local 116 int limit = byteBuffer.limit(); in test_updateLjava_nio_ByteBuffer() 117 md.update(byteBuffer); in test_updateLjava_nio_ByteBuffer() 119 assertEquals(byteBuffer.limit(), byteBuffer.position()); in test_updateLjava_nio_ByteBuffer() 120 assertEquals(limit, byteBuffer.limit()); in test_updateLjava_nio_ByteBuffer()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | MappedByteBufferTest.java | 196 ByteBuffer byteBuffer = ByteBuffer.allocateDirect(26 + 20); in setUp() local 198 byteBuffer.put((byte) ('A' + i)); in setUp() 201 byteBuffer.putInt(i + 1); in setUp() 203 byteBuffer.rewind(); in setUp() 204 fileChannel.write(byteBuffer); in setUp()
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
D | SSLEngineTest.java | 35 ByteBuffer byteBuffer) throws SSLException { return null; } in wrap() argument 36 @Override public SSLEngineResult unwrap(ByteBuffer byteBuffer, ByteBuffer[] byteBuffers, in unwrap() argument
|
/libcore/luni/src/test/java/tests/java/security/ |
D | SecureClassLoaderTest.java | 249 public Class<?> tryDefineClass(String name, ByteBuffer byteBuffer, CodeSource codeSource) { in tryDefineClass() argument 250 return this.defineClass(name, byteBuffer, codeSource); in tryDefineClass()
|
/libcore/luni/src/test/java/libcore/android/system/ |
D | OsTest.java | 262 ByteBuffer byteBuffer = ByteBuffer.wrap(contents); in test_byteBufferPositions_write_pwrite() local 264 byteBuffer.position(0); in test_byteBufferPositions_write_pwrite() 265 int written = Os.write(fd, byteBuffer); in test_byteBufferPositions_write_pwrite() 267 assertEquals(written, byteBuffer.position()); in test_byteBufferPositions_write_pwrite() 269 byteBuffer.position(4); in test_byteBufferPositions_write_pwrite() 270 written = Os.write(fd, byteBuffer); in test_byteBufferPositions_write_pwrite() 272 assertEquals(written + 4, byteBuffer.position()); in test_byteBufferPositions_write_pwrite() 274 byteBuffer.position(0); in test_byteBufferPositions_write_pwrite() 275 written = Os.pwrite(fd, byteBuffer, 64 /* offset */); in test_byteBufferPositions_write_pwrite() 277 assertEquals(written, byteBuffer.position()); in test_byteBufferPositions_write_pwrite() [all …]
|
/libcore/luni/src/main/native/ |
D | NetworkUtilities.cpp | 329 jobject byteBuffer, int& byteLen, bool isRW) { in getScopedBytesFromByteBuffer() argument 340 byteLen = env->CallIntMethod(byteBuffer, remainingMid); in getScopedBytesFromByteBuffer() 341 bool isDirect = env->CallBooleanMethod(byteBuffer, isDirectMid); in getScopedBytesFromByteBuffer() 344 objBuff = env->NewLocalRef(byteBuffer); // Add LocalRef to align with CallObjectMethod in getScopedBytesFromByteBuffer() 347 objBuff = env->CallObjectMethod(byteBuffer, arrayMid); in getScopedBytesFromByteBuffer()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | DatagramChannelMulticastTest.java | 1235 ByteBuffer byteBuffer) throws InterruptedException, IOException { in receiveExpectedDatagram() argument 1237 SocketAddress result = receiveWithTimeout(receivingChannel, byteBuffer, timeoutMillis); in receiveExpectedDatagram() 1250 ByteBuffer byteBuffer = ByteBuffer.allocate(100); in checkNoDatagramReceived() local 1252 SocketAddress result = receiveWithTimeout(receivingChannel, byteBuffer, 1000L); in checkNoDatagramReceived() 1267 ByteBuffer byteBuffer, long timeoutMillis) throws InterruptedException, IOException { in receiveWithTimeout() argument 1271 result = receivingChannel.receive(byteBuffer); in receiveWithTimeout()
|
/libcore/luni/src/test/java/libcore/libcore/io/ |
D | MemoryMappedFileTest.java | 578 ByteBuffer byteBuffer = ByteBuffer.wrap(underlyingData); in assertReadIntArraySucceeds() local 579 byteBuffer.position(posBefore); in assertReadIntArraySucceeds() 580 IntBuffer expectedIntsBuffer = byteBuffer.slice().order(byteOrder).asIntBuffer(); in assertReadIntArraySucceeds()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineTest.java | 1051 ByteBuffer byteBuffer) throws SSLException { return null; } in getRawEngine() 1052 @Override public SSLEngineResult unwrap(ByteBuffer byteBuffer, ByteBuffer[] byteBuffers, in getRawEngine() argument
|