jdk/src/java.base/share/classes/java/nio/channels/FileChannel.java
changeset 45881 aaec0fbe17ae
parent 45124 144479e89cdb
equal deleted inserted replaced
45871:878e21603932 45881:aaec0fbe17ae
   175      * options may be present:
   175      * options may be present:
   176      *
   176      *
   177      * <table class="striped">
   177      * <table class="striped">
   178      * <caption style="display:none">additional options</caption>
   178      * <caption style="display:none">additional options</caption>
   179      * <thead>
   179      * <thead>
   180      * <tr> <th>Option</th> <th>Description</th> </tr>
   180      * <tr> <th scope="col">Option</th> <th scope="col">Description</th> </tr>
   181      * </thead>
   181      * </thead>
   182      * <tbody>
   182      * <tbody>
   183      * <tr>
   183      * <tr>
   184      *   <td> {@link StandardOpenOption#APPEND APPEND} </td>
   184      *   <th scope="row"> {@link StandardOpenOption#APPEND APPEND} </th>
   185      *   <td> If this option is present then the file is opened for writing and
   185      *   <td> If this option is present then the file is opened for writing and
   186      *     each invocation of the channel's {@code write} method first advances
   186      *     each invocation of the channel's {@code write} method first advances
   187      *     the position to the end of the file and then writes the requested
   187      *     the position to the end of the file and then writes the requested
   188      *     data. Whether the advancement of the position and the writing of the
   188      *     data. Whether the advancement of the position and the writing of the
   189      *     data are done in a single atomic operation is system-dependent and
   189      *     data are done in a single atomic operation is system-dependent and
   190      *     therefore unspecified. This option may not be used in conjunction
   190      *     therefore unspecified. This option may not be used in conjunction
   191      *     with the {@code READ} or {@code TRUNCATE_EXISTING} options. </td>
   191      *     with the {@code READ} or {@code TRUNCATE_EXISTING} options. </td>
   192      * </tr>
   192      * </tr>
   193      * <tr>
   193      * <tr>
   194      *   <td> {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} </td>
   194      *   <th scope="row"> {@link StandardOpenOption#TRUNCATE_EXISTING TRUNCATE_EXISTING} </th>
   195      *   <td> If this option is present then the existing file is truncated to
   195      *   <td> If this option is present then the existing file is truncated to
   196      *   a size of 0 bytes. This option is ignored when the file is opened only
   196      *   a size of 0 bytes. This option is ignored when the file is opened only
   197      *   for reading. </td>
   197      *   for reading. </td>
   198      * </tr>
   198      * </tr>
   199      * <tr>
   199      * <tr>
   200      *   <td> {@link StandardOpenOption#CREATE_NEW CREATE_NEW} </td>
   200      *   <th scope="row"> {@link StandardOpenOption#CREATE_NEW CREATE_NEW} </th>
   201      *   <td> If this option is present then a new file is created, failing if
   201      *   <td> If this option is present then a new file is created, failing if
   202      *   the file already exists. When creating a file the check for the
   202      *   the file already exists. When creating a file the check for the
   203      *   existence of the file and the creation of the file if it does not exist
   203      *   existence of the file and the creation of the file if it does not exist
   204      *   is atomic with respect to other file system operations. This option is
   204      *   is atomic with respect to other file system operations. This option is
   205      *   ignored when the file is opened only for reading. </td>
   205      *   ignored when the file is opened only for reading. </td>
   206      * </tr>
   206      * </tr>
   207      * <tr>
   207      * <tr>
   208      *   <td > {@link StandardOpenOption#CREATE CREATE} </td>
   208      *   <th scope="row" > {@link StandardOpenOption#CREATE CREATE} </th>
   209      *   <td> If this option is present then an existing file is opened if it
   209      *   <td> If this option is present then an existing file is opened if it
   210      *   exists, otherwise a new file is created. When creating a file the check
   210      *   exists, otherwise a new file is created. When creating a file the check
   211      *   for the existence of the file and the creation of the file if it does
   211      *   for the existence of the file and the creation of the file if it does
   212      *   not exist is atomic with respect to other file system operations. This
   212      *   not exist is atomic with respect to other file system operations. This
   213      *   option is ignored if the {@code CREATE_NEW} option is also present or
   213      *   option is ignored if the {@code CREATE_NEW} option is also present or
   214      *   the file is opened only for reading. </td>
   214      *   the file is opened only for reading. </td>
   215      * </tr>
   215      * </tr>
   216      * <tr>
   216      * <tr>
   217      *   <td > {@link StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} </td>
   217      *   <th scope="row" > {@link StandardOpenOption#DELETE_ON_CLOSE DELETE_ON_CLOSE} </th>
   218      *   <td> When this option is present then the implementation makes a
   218      *   <td> When this option is present then the implementation makes a
   219      *   <em>best effort</em> attempt to delete the file when closed by the
   219      *   <em>best effort</em> attempt to delete the file when closed by the
   220      *   the {@link #close close} method. If the {@code close} method is not
   220      *   the {@link #close close} method. If the {@code close} method is not
   221      *   invoked then a <em>best effort</em> attempt is made to delete the file
   221      *   invoked then a <em>best effort</em> attempt is made to delete the file
   222      *   when the Java virtual machine terminates. </td>
   222      *   when the Java virtual machine terminates. </td>
   223      * </tr>
   223      * </tr>
   224      * <tr>
   224      * <tr>
   225      *   <td>{@link StandardOpenOption#SPARSE SPARSE} </td>
   225      *   <th scope="row">{@link StandardOpenOption#SPARSE SPARSE} </th>
   226      *   <td> When creating a new file this option is a <em>hint</em> that the
   226      *   <td> When creating a new file this option is a <em>hint</em> that the
   227      *   new file will be sparse. This option is ignored when not creating
   227      *   new file will be sparse. This option is ignored when not creating
   228      *   a new file. </td>
   228      *   a new file. </td>
   229      * </tr>
   229      * </tr>
   230      * <tr>
   230      * <tr>
   231      *   <td> {@link StandardOpenOption#SYNC SYNC} </td>
   231      *   <th scope="row"> {@link StandardOpenOption#SYNC SYNC} </th>
   232      *   <td> Requires that every update to the file's content or metadata be
   232      *   <td> Requires that every update to the file's content or metadata be
   233      *   written synchronously to the underlying storage device. (see <a
   233      *   written synchronously to the underlying storage device. (see <a
   234      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
   234      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
   235      *   integrity</a>). </td>
   235      *   integrity</a>). </td>
   236      * </tr>
   236      * </tr>
   237      * <tr>
   237      * <tr>
   238      *   <td> {@link StandardOpenOption#DSYNC DSYNC} </td>
   238      *   <th scope="row"> {@link StandardOpenOption#DSYNC DSYNC} </th>
   239      *   <td> Requires that every update to the file's content be written
   239      *   <td> Requires that every update to the file's content be written
   240      *   synchronously to the underlying storage device. (see <a
   240      *   synchronously to the underlying storage device. (see <a
   241      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
   241      *   href="../file/package-summary.html#integrity"> Synchronized I/O file
   242      *   integrity</a>). </td>
   242      *   integrity</a>). </td>
   243      * </tr>
   243      * </tr>