diff --git a/src/java.base/share/classes/java/io/RandomAccessFile.java b/src/java.base/share/classes/java/io/RandomAccessFile.java index 7d5b17c2783..2df78b901e6 100644 --- a/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -92,7 +92,7 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { /** * Creates a random access file stream to read from, and optionally - * to write to, a file with the specified name. A new + * to write to, a file with the specified pathname. A new * {@link FileDescriptor} object is created to represent the * connection to the file. * @@ -103,25 +103,25 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * *

* If there is a security manager, its {@code checkRead} method - * is called with the {@code name} argument + * is called with the {@code pathname} argument * as its argument to see if read access to the file is allowed. * If the mode allows writing, the security manager's * {@code checkWrite} method - * is also called with the {@code name} argument + * is also called with the {@code pathname} argument * as its argument to see if write access to the file is allowed. * - * @param name the system-dependent filename - * @param mode the access mode + * @param pathname the system-dependent pathname string + * @param mode the access mode * @throws IllegalArgumentException if the mode argument is not equal * to one of {@code "r"}, {@code "rw"}, {@code "rws"}, or * {@code "rwd"} * @throws FileNotFoundException - * if the mode is {@code "r"} but the given string does not + * if the mode is {@code "r"} but the given pathname string does not * denote an existing regular file, or if the mode begins with - * {@code "rw"} but the given string does not denote an + * {@code "rw"} but the given pathname string does not denote an * existing, writable regular file and a new regular file of - * that name cannot be created, or if some other error occurs - * while opening or creating the file + * that pathname cannot be created, or if some other error + * occurs while opening or creating the file * @throws SecurityException if a security manager exists and its * {@code checkRead} method denies read access to the file * or the mode is {@code "rw"} and the security manager's @@ -130,10 +130,10 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * @see java.lang.SecurityManager#checkRead(java.lang.String) * @see java.lang.SecurityManager#checkWrite(java.lang.String) */ - public RandomAccessFile(String name, String mode) + public RandomAccessFile(String pathname, String mode) throws FileNotFoundException { - this(name != null ? new File(name) : null, mode); + this(pathname != null ? new File(pathname) : null, mode); } /** @@ -191,8 +191,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * called with the pathname of the {@code file} argument as its * argument to see if read access to the file is allowed. If the mode * allows writing, the security manager's {@code checkWrite} method is - * also called with the path argument to see if write access to the file is - * allowed. + * also called with the pathname of the {@code file} argument to see if + * write access to the file is allowed. * * @param file the file object * @param mode the access mode, as described @@ -205,8 +205,8 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * not denote an existing regular file, or if the mode begins * with {@code "rw"} but the given file object does not denote * an existing, writable regular file and a new regular file of - * that name cannot be created, or if some other error occurs - * while opening or creating the file + * that pathname cannot be created, or if some other error + * occurs while opening or creating the file * @throws SecurityException if a security manager exists and its * {@code checkRead} method denies read access to the file * or the mode is {@code "rw"} and the security manager's