RFR: 6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified
Alan Bateman
alanb at openjdk.org
Fri Oct 14 17:08:19 UTC 2022
On Thu, 13 Oct 2022 23:47:54 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Add some verbiage stating that the outcome of invoking the absolute write method `java.nio.channels.write(ByteBuffer,long)` is unspecified when the channel was opened with the `APPEND` option present.
src/java.base/share/classes/java/nio/channels/FileChannel.java line 151:
> 149: * therefore unspecified. In this mode an invocation of the {@linkplain
> 150: * #write(ByteBuffer,long) absolute write} operation leads to unspecified
> 151: * behavior.
I'm not sure about the phrase "absolute write" as we haven't used that before. I think it might be better to say something like "In this mode, the behavior of the method to write at a given position is also system-dependent".
-------------
PR: https://git.openjdk.org/jdk/pull/10707
More information about the nio-dev
mailing list