/libcore/ojluni/src/main/java/java/io/ |
D | DataInputStream.java | 317 readFully(readBuffer, 0, 2); in readShort() 318 return Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readShort() 341 readFully(readBuffer, 0, 2); in readUnsignedShort() 342 return Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN) & 0xffff; in readUnsignedShort() 365 readFully(readBuffer, 0, 2); in readChar() 366 return (char)Memory.peekShort(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readChar() 389 readFully(readBuffer, 0, 4); in readInt() 390 return Memory.peekInt(readBuffer, 0, ByteOrder.BIG_ENDIAN); in readInt() 393 private byte readBuffer[] = new byte[8]; field in DataInputStream 413 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 …]
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | AbstractZipFileTest.java | 55 byte[] readBuffer = new byte[8192]; in testInflatingFilesRequiringZipRefill() 64 while (is.read(readBuffer, 0, readBuffer.length) != -1) {} in testInflatingFilesRequiringZipRefill() 179 byte[] readBuffer = new byte[8192]; in testInflatingStreamsRequiringZipRefill() 185 while (in.read(readBuffer, 0, readBuffer.length) != -1) {} in testInflatingStreamsRequiringZipRefill() 551 byte[] readBuffer = new byte[1024 * 64 - 32]; in testReadMoreThan8kInOneRead() 556 int read = is.read(readBuffer, 0, readBuffer.length); in testReadMoreThan8kInOneRead() 560 assertEquals(readBuffer.length, read); in testReadMoreThan8kInOneRead() 572 byte[] readBuffer = new byte[bufferSize]; in testReadWithOffset() 579 int read = is.read(readBuffer, bufferSize - 32, 32); in testReadWithOffset() 584 assertEquals(0, readBuffer[i]); in testReadWithOffset() [all …]
|
/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 | 339 byte[] readBuffer = new byte[128]; in assertAvailableReturnsZeroAfterSocketReadsAllData() 344 total += in.read(readBuffer); in assertAvailableReturnsZeroAfterSocketReadsAllData()
|