8259218: (fs) Add links in from overloaded methods in java.nio.file.Files

Reviewed-by: dfuchs, alanb
This commit is contained in:
Brian Burkhalter 2021-03-10 20:02:12 +00:00
parent acda812958
commit b482733f94

View file

@ -2849,9 +2849,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <blockquote><pre> * <blockquote>{@link
* walkFileTree(start, EnumSet.noneOf(FileVisitOption.class), Integer.MAX_VALUE, visitor) * walkFileTree(Path, Set<FileVisitOption>, int, FileVisitor<? super Path>)
* </pre></blockquote> * Files.walkFileTree(start, EnumSet.noneOf(FileVisitOption.class), Integer.MAX_VALUE, visitor)
* }</blockquote>
* In other words, it does not follow symbolic links, and visits all levels * In other words, it does not follow symbolic links, and visits all levels
* of the file tree. * of the file tree.
* *
@ -2925,9 +2926,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <pre>{@code * <blockquote>{@link
* newBufferedReader(Path, Charset)
* Files.newBufferedReader(path, StandardCharsets.UTF_8) * Files.newBufferedReader(path, StandardCharsets.UTF_8)
* }</pre> * }</blockquote>
* *
* @param path * @param path
* the path to the file * the path to the file
@ -3006,9 +3008,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <pre>{@code * <blockquote>{@link
* newBufferedWriter(Path, Charset, OpenOption...)
* Files.newBufferedWriter(path, StandardCharsets.UTF_8, options) * Files.newBufferedWriter(path, StandardCharsets.UTF_8, options)
* }</pre> * }</blockquote>
* *
* @param path * @param path
* the path to the file * the path to the file
@ -3286,8 +3289,8 @@ public final class Files {
* The method ensures that the file is closed when all content have been read * The method ensures that the file is closed when all content have been read
* or an I/O error, or other runtime exception, is thrown. * or an I/O error, or other runtime exception, is thrown.
* *
* <p> This method is equivalent to: * <p> This method is equivalent to: {@link readString(Path, Charset)
* {@code readString(path, StandardCharsets.UTF_8) } * readString(path, StandardCharsets.UTF_8)}.
* *
* @param path the path to the file * @param path the path to the file
* *
@ -3411,9 +3414,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <pre>{@code * <blockquote>{@link
* readAllLines(Path, Charset)
* Files.readAllLines(path, StandardCharsets.UTF_8) * Files.readAllLines(path, StandardCharsets.UTF_8)
* }</pre> * }</blockquote>
* *
* @param path * @param path
* the path to the file * the path to the file
@ -3569,9 +3573,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <pre>{@code * <blockquote>{@link
* Files.write(path, lines, StandardCharsets.UTF_8, options); * write(Path, Iterable<? extends CharSequence>, Charset, OpenOption...)
* }</pre> * Files.write(path, lines, StandardCharsets.UTF_8, options)
* }</blockquote>
* *
* @param path * @param path
* the path to the file * the path to the file
@ -3612,8 +3617,9 @@ public final class Files {
* Characters are encoded into bytes using the * Characters are encoded into bytes using the
* {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}. * {@link StandardCharsets#UTF_8 UTF-8} {@link Charset charset}.
* *
* <p> This method is equivalent to: * <p> This method is equivalent to: {@link
* {@code writeString(path, test, StandardCharsets.UTF_8, options) } * writeString(Path, CharSequence, Charset, OpenOption...)
* writeString(path, csq, StandardCharsets.UTF_8, options)}.
* *
* @param path * @param path
* the path to the file * the path to the file
@ -3910,9 +3916,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <blockquote><pre> * <blockquote>{@link
* walk(start, Integer.MAX_VALUE, options) * walk(Path, int, FileVisitOption...)
* </pre></blockquote> * Files.walk(start, Integer.MAX_VALUE, options)
* }</blockquote>
* In other words, it visits all levels of the file tree. * In other words, it visits all levels of the file tree.
* *
* <p> The returned stream contains references to one or more open directories. * <p> The returned stream contains references to one or more open directories.
@ -4171,9 +4178,10 @@ public final class Files {
* *
* <p> This method works as if invoking it were equivalent to evaluating the * <p> This method works as if invoking it were equivalent to evaluating the
* expression: * expression:
* <pre>{@code * <blockquote>{@link
* lines(Path, Charset)
* Files.lines(path, StandardCharsets.UTF_8) * Files.lines(path, StandardCharsets.UTF_8)
* }</pre> * }</blockquote>
* *
* @apiNote * @apiNote
* This method must be used within a try-with-resources statement or similar * This method must be used within a try-with-resources statement or similar