RFR: 8303260: (fc) FileChannel::transferFrom should support position > size()

Brian Burkhalter bpb at openjdk.org
Wed Mar 1 01:42:42 UTC 2023


Enhance `FileChannel::transferFrom` to extend the channel's file if `position > size()`. This is consistent with `FileChannel::write(ByteBuffer, long)`.

-------------

Commit messages:
 - 8303260: (fc) FileChannel::transferFrom should support position > size()

Changes: https://git.openjdk.org/jdk/pull/12797/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12797&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303260
  Stats: 150 lines in 3 files changed: 138 ins; 2 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/12797.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12797/head:pull/12797

PR: https://git.openjdk.org/jdk/pull/12797


More information about the nio-dev mailing list