6924219: (fc spec) FileChannel.write(ByteBuffer, position) behavior when file opened for append not specified

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2022-10-18 16:58:45 +00:00
parent 5dbd495115
commit d1f794587c

View File

@ -146,7 +146,9 @@ import jdk.internal.javac.PreviewFeature;
* operation first advances the position to the end of the file and then writes
* the requested data. Whether the advancement of the position and the writing
* of the data are done in a single atomic operation is system-dependent and
* therefore unspecified.
* therefore unspecified. In this mode the behavior of the method to
* {@linkplain #write(ByteBuffer,long) write at a given position} is also
* system-dependent.
*
* @see java.io.FileInputStream#getChannel()
* @see java.io.FileOutputStream#getChannel()
@ -193,7 +195,9 @@ public abstract class FileChannel
* the position to the end of the file and then writes the requested
* data. Whether the advancement of the position and the writing of the
* data are done in a single atomic operation is system-dependent and
* therefore unspecified. This option may not be used in conjunction
* therefore unspecified. The effect of {@linkplain
* #write(ByteBuffer,long) writing at a given position} with this option
* present is unspecified. This option may not be used in conjunction
* with the {@code READ} or {@code TRUNCATE_EXISTING} options. </td>
* </tr>
* <tr>
@ -809,6 +813,9 @@ public abstract class FileChannel
* grown to accommodate the new bytes; the values of any bytes between the
* previous end-of-file and the newly-written bytes are unspecified. </p>
*
* <p> If the file is open in <a href="#append-mode">append mode</a>, then
* the effect of invoking this method is unspecified.
*
* @param src
* The buffer from which bytes are to be transferred
*