/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | FileChannelTest.java | 55 FileChannel fc = new FileInputStream(tmp).getChannel(); in testReadOnlyByteArrays() local 57 fc.read(readOnly); in testReadOnlyByteArrays() 62 fc.read(new ByteBuffer[] { readOnly }); in testReadOnlyByteArrays() 67 fc.read(new ByteBuffer[] { readOnly }, 0, 1); in testReadOnlyByteArrays() 72 fc.read(readOnly, 0L); in testReadOnlyByteArrays() 76 fc.close(); in testReadOnlyByteArrays() 80 fc = new FileOutputStream(tmp).getChannel(); in testReadOnlyByteArrays() 81 fc.write(readOnly); in testReadOnlyByteArrays() 82 fc.write(new ByteBuffer[] { readOnly }); in testReadOnlyByteArrays() 83 fc.write(new ByteBuffer[] { readOnly }, 0, 1); in testReadOnlyByteArrays() [all …]
|
D | FileLockTest.java | 40 try(FileChannel fc = fos.getChannel()) { in testToString() argument 41 FileLock lock = fc.lock(0, 42, false); in testToString() 59 try(FileChannel fc = fis.getChannel()) { in testToString() argument 60 FileLock lock = fc.lock(0, 42, true); in testToString()
|
/libcore/ojluni/src/test/java/nio/MappedByteBuffer/ |
D | ForceViews.java | 52 private FileChannel fc; field in ForceViews 60 fc = FileChannel.open(file, CREATE_NEW, READ, WRITE, DELETE_ON_CLOSE); in openChannel() 62 fc.write(buf); in openChannel() 63 fc.position(0); in openChannel() 69 fc.close(); in closeChannel() 88 {"Absolute slice", fc, 256, 512, 128, 128, 32, 32, absSlice}, in provider() 89 {"Relative slice", fc, 256, 512, 0, 128, 32, 32, relSlice}, in provider() 90 {"Duplicate", fc, 256, 512, 0, 256, 32, 32, duplicate}, in provider() 91 {"Compact", fc, 256, 512, 0, 256, 32, 32, compact} in provider() 99 private void test(String tst, FileChannel fc, int mapPosition, int mapLength, in test() argument [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | FileInputStream.java | 562 FileChannel fc = channel; in close() local 563 if (fc != null) { in close() 566 fc.close(); in close() 616 FileChannel fc = this.channel; in getChannel() local 617 if (fc == null) { in getChannel() 619 fc = this.channel; in getChannel() 620 if (fc == null) { in getChannel() 621 this.channel = fc = FileChannelImpl.open(fd, path, true, in getChannel() 630 fc.close(); in getChannel() 638 return fc; in getChannel()
|
D | FileOutputStream.java | 523 FileChannel fc = this.channel; in getChannel() local 524 if (fc == null) { in getChannel() 526 fc = this.channel; in getChannel() 527 if (fc == null) { in getChannel() 528 this.channel = fc = FileChannelImpl.open(fd, path, false, in getChannel() 537 fc.close(); in getChannel() 545 return fc; in getChannel()
|
/libcore/luni/src/test/java/tests/support/ |
D | MockFunction.java | 35 public void function(FunctionContext fc, String args[]) { in function() argument 38 fc.set_result(args[0].toLowerCase()); in function() 42 public void step(FunctionContext fc, String args[]) { in step() argument 50 public void last_step(FunctionContext fc) { in last_step() argument 52 fc.set_result(acc.toString()); in last_step()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
D | MappedByteBufferTest.java | 46 FileChannel fc = fis.getChannel(); in testasIntBuffer() local 47 MappedByteBuffer mmb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc in testasIntBuffer() 64 fc.close(); in testasIntBuffer() 76 FileChannel fc = fis.getChannel(); in testEmptyBuffer() local 77 MappedByteBuffer mmb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size()); in testEmptyBuffer() 104 mmb = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in testEmptyBuffer() 113 mmb = fc.map(FileChannel.MapMode.PRIVATE, 0, fc.size()); in testEmptyBuffer() 120 fc.close(); in testEmptyBuffer()
|
/libcore/ojluni/src/test/java/nio/channels/Channels/ |
D | Write.java | 44 FileChannel fc = fos.getChannel(); in testWrite() local 45 OutputStream out = Channels.newOutputStream(fc); in testWrite() 51 fc.close(); in testWrite()
|
D | Basic.java | 244 FileChannel fc = fos.getChannel(); in testNewOutputStream() local 245 WritableByteChannel wbc = (WritableByteChannel)fc; in testNewOutputStream() 255 FileChannel fc = fis.getChannel(); in testNewInputStream() local 256 InputStream is = Channels.newInputStream(fc); in testNewInputStream() 264 long rem = Math.min(fc.size() - totalRead, (long)Integer.MAX_VALUE); in testNewInputStream()
|
/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | DefaultFileSystemProvider2Test.java | 433 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel() local 434 assertEquals(filesSetup.TEST_FILE_DATA, readFromFileChannel(fc)); in test_newFileChannel() 443 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel() local 444 assertEquals(filesSetup.TEST_FILE_DATA, readFromFileChannel(fc)); in test_newFileChannel() 453 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel() local 454 assertEquals(filesSetup.TEST_FILE_DATA, readFromFileChannel(fc)); in test_newFileChannel() 465 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel() local 466 writeToFileChannel(fc, filesSetup.TEST_FILE_DATA_2); in test_newFileChannel() 467 fc.close(); in test_newFileChannel() 479 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel() local [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_Format.java | 138 FieldContainer fc = (FieldContainer) obj; in equals() local 139 return (start == fc.start && end == fc.end in equals() 140 && attribute == fc.attribute && value.equals(fc.value)); in equals()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | Support_Format.java | 131 FieldContainer fc = (FieldContainer) obj; in equals() local 132 …return (start == fc.start && end == fc.end && attribute == fc.attribute && value.equals(fc.value)); in equals()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | ByteBufferBulkBenchmark.java | 61 FileChannel fc = raf.getChannel(); in newBuffer() local 62 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
|
D | ByteBufferBenchmark.java | 71 FileChannel fc = raf.getChannel(); in newBuffer() local 72 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
|
/libcore/luni/src/main/java/java/nio/ |
D | NioUtils.java | 71 public static FileDescriptor getFD(FileChannel fc) { in getFD() argument 72 return ((FileChannelImpl) fc).fd; in getFD()
|
/libcore/ojluni/src/main/java/java/util/ |
D | ArraysParallelSortHelpers.java | 135 Relay fc = new Relay(new Merger<>(s, w, a, wb, h, in compute() local 137 Relay rc = new Relay(new Merger<>(fc, a, w, b+h, q, in compute() 141 Relay bc = new Relay(new Merger<>(fc, a, w, b, q, in compute()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | FileOutputStreamTest.java | 402 FileChannel fc = fos.getChannel(); in test_getChanne_Append_Append() local 404 assertEquals(10, fc.position()); in test_getChanne_Append_Append() 405 fc.write(ByteBuffer.wrap("hello".getBytes(java.nio.charset.StandardCharsets.UTF_8))); in test_getChanne_Append_Append() 406 assertEquals(15, fc.position()); in test_getChanne_Append_Append()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldRandomAccessFileTest.java | 184 FileChannel fc = raf.getChannel(); in test_getChannel() local 188 assertTrue("Test 1: Channel position expected to be 0.", fc.position() == 0); in test_getChannel() 192 testLength, fc.position()); in test_getChannel() 194 fc.position() == raf.getFilePointer()); in test_getChannel()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ScannerTest.java | 370 FileChannel fc = new FileOutputStream(tmpFile).getChannel(); in test_ConstructorLjava_nio_channels_ReadableByteChannel() local 371 s = new Scanner(fc); in test_ConstructorLjava_nio_channels_ReadableByteChannel() 410 FileChannel fc = new FileOutputStream(tmpFile).getChannel(); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() local 411 s = new Scanner(fc, Charset.defaultCharset().name()); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() 415 fc = new FileOutputStream(tmpFile).getChannel(); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() 417 s = new Scanner(fc, "invalid charset"); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() 421 fc.close(); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() 440 s = new Scanner(fc, (String) null); in test_ConstructorLjava_nio_channels_ReadableByteChannelLjava_lang_String() 492 FileChannel fc = fos.getChannel(); in test_close() local 493 s = new Scanner(fc); in test_close() [all …]
|
/libcore/ojluni/src/test/java/nio/Buffer/ |
D | BasicByte.java | 550 try (FileChannel fc = FileChannel.open(tempFile)) { in createMappedBuffer() argument 552 fc.map(FileChannel.MapMode.READ_ONLY, 0, contents.length); in createMappedBuffer()
|
D | Basic-X.java.template | 550 try (FileChannel fc = FileChannel.open(tempFile)) { 552 fc.map(FileChannel.MapMode.READ_ONLY, 0, contents.length);
|