/libcore/ojluni/src/main/java/java/io/ |
D | DataInputStream.java | 322 readFully(readBuffer, 0, 2); in readShort() 323 return Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readShort() 346 readFully(readBuffer, 0, 2); in readUnsignedShort() 347 return Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN) & 0xffff; in readUnsignedShort() 370 readFully(readBuffer, 0, 2); in readChar() 371 return (char)Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readChar() 394 readFully(readBuffer, 0, 4); in readInt() 395 return Memory.peekInt(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readInt() 398 private byte readBuffer[] = new byte[8]; field in DataInputStream 418 readFully(readBuffer, 0, 8); in readLong() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | FileChannelTest.java | 185 byte[] readBuffer = new byte[CONTENT_AS_BYTES_LENGTH]; in test_forceJ() 187 fis.read(readBuffer); in test_forceJ() 188 assertTrue(Arrays.equals(CONTENT_AS_BYTES, readBuffer)); in test_forceJ() 234 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadOnly() local 235 readOnlyFileChannel.read(readBuffer); in test_position_ReadOnly() 293 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadWrite() local 294 readWriteFileChannel.read(readBuffer); in test_position_ReadWrite() 394 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_positionJ_ReadOnly() local 395 int count = readOnlyFileChannel.read(readBuffer); in test_positionJ_ReadOnly() 399 readBuffer.flip(); in test_positionJ_ReadOnly() [all …]
|
D | SocketChannelTest.java | 2927 ByteBuffer readBuffer = ByteBuffer.allocate(1024); in test_write$LByteBuffer2() local 2928 while (EOF != worker.read(readBuffer)) {} in test_write$LByteBuffer2() 2929 readBuffer.flip(); in test_write$LByteBuffer2() 2931 assertEquals(expected, readBuffer); in test_write$LByteBuffer2() 2968 ByteBuffer readBuffer = ByteBuffer.allocate(1024); in test_write$LByteBuffer_buffers() local 2969 while (EOF != worker.read(readBuffer)) {} in test_write$LByteBuffer_buffers() 2970 readBuffer.flip(); in test_write$LByteBuffer_buffers() 2971 assertEquals(ByteBuffer.wrap(data), readBuffer); in test_write$LByteBuffer_buffers() local 3010 ByteBuffer readBuffer = ByteBuffer.allocate(1024); in test_write$LByteBuffer_writes() local 3011 while (EOF != worker.read(readBuffer)) {} in test_write$LByteBuffer_writes() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | AbstractZipFileTest.java | 53 byte[] readBuffer = new byte[8192]; in testInflatingFilesRequiringZipRefill() 62 while (is.read(readBuffer, 0, readBuffer.length) != -1) {} in testInflatingFilesRequiringZipRefill() 177 byte[] readBuffer = new byte[8192]; in testInflatingStreamsRequiringZipRefill() 183 while (in.read(readBuffer, 0, readBuffer.length) != -1) {} in testInflatingStreamsRequiringZipRefill() 505 byte[] readBuffer = new byte[1024 * 64 - 32]; in testReadMoreThan8kInOneRead() 510 int read = is.read(readBuffer, 0, readBuffer.length); in testReadMoreThan8kInOneRead() 514 assertEquals(readBuffer.length, read); in testReadMoreThan8kInOneRead() 526 byte[] readBuffer = new byte[bufferSize]; in testReadWithOffset() 533 int read = is.read(readBuffer, bufferSize - 32, 32); in testReadWithOffset() 538 assertEquals(0, readBuffer[i]); in testReadWithOffset() [all …]
|
D | OldAndroidZipStressTest.java | 41 byte[] readBuffer = new byte[1024]; in checkJarCertificates() 47 while (is.read(readBuffer, 0, readBuffer.length) != -1) { in checkJarCertificates()
|
/libcore/benchmarks/src/benchmarks/ |
D | ZipFileReadBenchmark.java | 75 byte readBuffer[] = new byte[readBufferSize]; in timeZipFileRead() 82 if (is.read(readBuffer, 0, readBuffer.length) < 0) { in timeZipFileRead()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | URLConnectionBenchmark.java | 36 private byte[] readBuffer; field in URLConnectionBenchmark 52 readBuffer = new byte[readBufferSize]; in setUp() 85 while ((count = in.read(readBuffer)) != -1) { in get()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | OldFileChannelTest.java | 152 byte[] readBuffer = new byte[CONTENT_AS_BYTES_LENGTH]; in test_forceZ() 154 fis.read(readBuffer); in test_forceZ() 155 assertTrue(Arrays.equals(CONTENT_AS_BYTES, readBuffer)); in test_forceZ() 161 readBuffer = new byte[CONTENT_AS_BYTES_LENGTH]; in test_forceZ() 163 fis.read(readBuffer); in test_forceZ() 164 assertTrue(Arrays.equals(CONTENT_AS_BYTES, readBuffer)); in test_forceZ() 260 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBufferJ_IllegalArgument() local 263 readOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument() 270 writeOnlyFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument() 277 readWriteFileChannel.read(readBuffer, -1); in test_readLByteBufferJ_IllegalArgument() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineTest.java | 1094 private ByteBuffer readBuffer; 1116 readBuffer = ByteBuffer.allocate(200000); 1130 if (readBuffer == null || readBuffer.remaining() == 0 || readBuffer.position() == 0) { 1131 readBuffer.clear(); 1132 int read = in.read(readBuffer); 1134 readBuffer.rewind(); 1135 readBuffer.limit(read); 1137 return readBuffer;
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | UnixAsynchronousSocketChannelImpl.java | 78 private ByteBuffer readBuffer; field in UnixAsynchronousSocketChannelImpl 411 n = IOUtil.read(fd, readBuffer, -1, nd); in finishRead() 422 this.readBuffer = null; in finishRead() 540 this.readBuffer = dst; in implRead()
|
/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | DefaultFileSystemProviderTest.java | 311 ByteBuffer readBuffer = ByteBuffer.allocate(10); in test_newByteChannel() local 312 int bytesReadCount = sbc.read(readBuffer); in test_newByteChannel() 314 String readData = new String(Arrays.copyOf(readBuffer.array(), bytesReadCount), in test_newByteChannel() 368 ByteBuffer readBuffer = ByteBuffer.allocate(10); in test_newByteChannel_openOption_WRITE_READ() local 369 int bytesReadCount = sbc.read(readBuffer); in test_newByteChannel_openOption_WRITE_READ() 371 String readData = new String(Arrays.copyOf(readBuffer.array(), bytesReadCount), in test_newByteChannel_openOption_WRITE_READ()
|
D | DefaultSecureDirectoryStreamTest.java | 229 ByteBuffer readBuffer = ByteBuffer.allocate(10); in test_newByteChannel() local 230 int bytesReadCount = sbc.read(readBuffer); in test_newByteChannel() 232 String readData = new String(Arrays.copyOf(readBuffer.array(), bytesReadCount), in test_newByteChannel()
|
D | Files2Test.java | 1186 ByteBuffer readBuffer = ByteBuffer.allocate(10); in test_newByteChannel() local 1187 int bytesReadCount = sbc.read(readBuffer); in test_newByteChannel() 1189 String readData = new String(Arrays.copyOf(readBuffer.array(), bytesReadCount), in test_newByteChannel() 1230 ByteBuffer readBuffer = ByteBuffer.allocate(10); in test_newByteChannel_openOption_WRITE_READ() local 1231 int bytesReadCount = sbc.read(readBuffer); in test_newByteChannel_openOption_WRITE_READ() 1233 String readData = new String(Arrays.copyOf(readBuffer.array(), bytesReadCount), in test_newByteChannel_openOption_WRITE_READ()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | SocketTest.java | 406 byte[] readBuffer = new byte[128]; in assertAvailableReturnsZeroAfterSocketReadsAllData() 411 total += in.read(readBuffer); in assertAvailableReturnsZeroAfterSocketReadsAllData()
|